Re: [PATCH] drm/i915: Handle the no-interrupts case for UMS by polling

2011-01-24 Thread Chris Clayton
On Sunday 23 January 2011, Chris Wilson wrote:
> If the driver calls into the kernel to wait for a breadcrumb to pass,
> but hasn't enabled interrupts, fallback to polling the breadcrumb value.
>
> Reported-by: Chris Clayton 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/i915_irq.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c
> b/drivers/gpu/drm/i915/i915_irq.c index 98106b7..4b5a35c 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1293,12 +1293,12 @@ static int i915_wait_irq(struct drm_device * dev,
> int irq_nr) if (master_priv->sarea_priv)
>   master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
>
> - ret = -ENODEV;
>   if (ring->irq_get(ring)) {
>   DRM_WAIT_ON(ret, ring->irq_queue, 3 * DRM_HZ,
>   READ_BREADCRUMB(dev_priv) >= irq_nr);
>   ring->irq_put(ring);
> - }
> + } else if (wait_for(READ_BREADCRUMB(dev_priv) >= irq_nr, 3000))
> + ret = -EBUSY;
>
>   if (ret == -EBUSY) {
>   DRM_ERROR("EBUSY -- rec: %d emitted: %d\n",

That's done it. With all three patches applied, X and KDE are starting now. 
Thanks for your work on this.

A couple of points though.

1. The latest patch applied but the following warning was spat out:

patching file drivers/gpu/drm/i915/i915_irq.c
Hunk #1 succeeded at 1288 (offset -5 lines).

I guess we may be working with slightly different versions of the source.

2. The kernel log now contains the following:

r8169 :02:00.0: eth0: link up
[drm] Initialized drm 1.1.0 20060810
irq 16: nobody cared (try booting with the "irqpoll" option)
Pid: 0, comm: kworker/0:1 Not tainted 2.6.38-rc2+ #502
Call Trace:
 [] ? __report_bad_irq.clone.2+0x24/0x90
 [] ? note_interrupt+0x157/0x190
 [] ? ack_apic_level+0x5d/0x1e0
 [] ? handle_fasteoi_irq+0xab/0xd0
 [] ? handle_fasteoi_irq+0x0/0xd0
   [] ? do_IRQ+0x3d/0xc0
 [] ? irq_exit+0x57/0x70
 [] ? smp_apic_timer_interrupt+0x53/0x90
 [] ? common_interrupt+0x29/0x30
 [] ? acpi_safe_halt+0x19/0x26
 [] ? acpi_idle_enter_c1+0x5a/0xa9
 [] ? cpuidle_idle_call+0x68/0xf0
 [] ? cpu_idle+0x46/0x80
handlers:
[] (azx_interrupt+0x0/0x180)
[] (usb_hcd_irq+0x0/0x60)
Disabling IRQ #16
pci :00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci :00:02.0: setting latency timer to 64
ioremap error for 0xbdce-0xbdce3000, requested 0x10, got 0x0
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] No driver support for vblank timestamp query.
[drm] Initialized i915 1.6.0 20080730 for :00:02.0 on minor 0

Is this likely to be related the the irq issues your patch addressed or is it a 
separate thing that I should report separately?

Thanks again.

Chris

-- 
The more I see, the more I know. The more I know, the less I understand. 
Changing Man - Paul Weller
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 1/1] Use cachable mapping for i915 opregion.

2011-01-24 Thread Michael Karcher
The opregion is a shared memory region between ACPI and the graphics
driver. As the ACPI mapping has been changed to cachable in commit
6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
non-cachable now fails. As no bus-master hardware is involved in the
opregion, cachable map should do no harm.

Tested on a Fujitsu Lifebook P8010.

Signed-off-by: Michael Karcher 
---
 drivers/gpu/drm/i915/intel_opregion.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_opregion.c 
b/drivers/gpu/drm/i915/intel_opregion.c
index f295a7a..dfaccd5 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -476,7 +476,7 @@ int intel_opregion_setup(struct drm_device *dev)
return -ENOTSUPP;
}
 
-   base = ioremap(asls, OPREGION_SIZE);
+   base = ioremap_cache(asls, OPREGION_SIZE);
if (!base)
return -ENOMEM;
 
-- 
1.7.2.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 31830] [bisected] broken shadows in Unigine Sanctuary and Lightsmark

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31830

--- Comment #5 from Tom Stellard  2011-01-24 01:13:49 PST 
---
Created an attachment (id=42355)
 View: https://bugs.freedesktop.org/attachment.cgi?id=42355
 Review: https://bugs.freedesktop.org/review?bug=31830&attachment=42355

Possible Fix

I think this patch fixes Lightsmark, can you confirm this?  Does this patch fix
Sanctuary as well?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33399] New: No HDMI PCM mutichannel audio

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=33399

   Summary: No HDMI PCM mutichannel audio
   Product: DRI
   Version: XOrg CVS
  Platform: All
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: xavier.bes...@free.fr


Hi,

using a HD 2600, audio over HDMI is stereo-only. The only mean to have
multichannel (e.g. 5.1) is to use passthrough, but true multichannel (e.g. 8
channels PCM) isn't supported by the driver, although it should be supported by
the HDMI standard.

Here's the excerpt from alsa-info.sh concerning the card:
Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x10
No Modem Function Group found
Default PCM:
rates [0x40]: 48000
bits [0x2]: 16
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x201: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Device: name="HDMI 0", type="HDMI", device=3
  Converter: stream=1, channel=0
  Digital: Enabled GenLevel
  Digital category: 0x2
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x0094: OUT Detect HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
 0x02


Full data is at
http://www.alsa-project.org/db/?f=b3f67a0890f9878b7b3f345578e24eda0aaa59ac

Thanks,
Xav

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33185] X crashes when kWin effects are turned on

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=33185

--- Comment #4 from Michel Dänzer  2011-01-24 02:47:57 PST 
---
(In reply to comment #2)
> do you mean I have to install debugging symbols when kWin crashes (in its
> dialogue window)? Is it sufficient?

I don't know if it's possible/sufficient at that point. Better install them
before reproducing the problem.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32544

Michel Dänzer  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Michel Dänzer  2011-01-24 02:54:12 PST 
---
Jakob pushed a driver-independent solution in commit
4c73030d47f39441d718157f7d9a59c136bbfac0 ('draw: Init llvm if not provided').

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Broken locking in ttm_bo_swapout

2011-01-24 Thread Maarten Maathuis
On Thu, Jan 20, 2011 at 7:53 PM, Matthew Bullock
 wrote:
> I have a fairly simple opengl application running on nouveau. It effectively
> just plots a couple of very large images that change regularly.
>
> I've been getting an easily repeatable failure, hitting the
> BUG_ON(in_interrupt) in vfree() that is called during ttm_shrink_work().
> Obviously vfree() is being called with a lock held...
>
> Looking at the locking up through the stack trace, there's an obvious
> mistake:
>
> There should be a:
> spin_lock(&glob->lru_lock);
> before the continue in ttm_bo_swapout() in drivers/gpu/drm/ttm/ttm_bo.c
>
> --- ttm_bo.c~   2011-01-05 00:50:19.0 +
> +++ ttm_bo.c    2011-01-20 18:11:57.262813765 +
> @@ -1761,6 +1761,7 @@ static int ttm_bo_swapout(struct ttm_mem
>                        spin_unlock(&glob->lru_lock);
>                        (void) ttm_bo_cleanup_refs(bo, false, false, false);
>                        kref_put(&bo->list_kref, ttm_bo_release_list);
> +                       spin_lock(&glob->lru_lock);
>                        continue;
>                }
>
> That fixes the problem for me.
>
> Matthew
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

This seems (very) plausible, maybe someone who commits drm patches
frequently will see this message now.

It would be a shame to forget about this e-mail.

Maarten.

-- 
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26552] Screen flickering with 2.6.37 [ATI X1600]

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26552





--- Comment #28 from Daniel   2011-01-24 12:56:04 ---
Okay Alex, the patch of #20 on top of #8 plus the second mini patch from #10
seems to be stable for me. The last days i had no more flickering and no black
screens.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RFC PATCH v2] Utilize the PCI API in the TTM framework.

2011-01-24 Thread Konrad Rzeszutek Wilk
On Wed, Jan 12, 2011 at 10:19:39AM -0500, Konrad Rzeszutek Wilk wrote:
> On Wed, Jan 12, 2011 at 10:12:14AM +0100, Thomas Hellstrom wrote:
> > Hi, Konrad.
> > 
> > This discussion has become a bit lenghty. I'll filter out the
> > sorted-out stuff, which leaves me with two remaining issues:
> 
> 

ping?

... did I miss some extra discussion?
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Add a reset interface

2011-01-24 Thread Chris Wilson
For i915 there is a need to invalidate some cached state after resuming or
reseting the GPU. This is not quite the same as simply restoring saved
state (i.e. the standard suspend resume method), so do not seem to merit
reusing the save|restore vfuncs.  Instead I propose a

   drm_mode_config_reset(struct drm_device *);

routine to iterate over all the attached CRTCs, encoders and connectors
and call any supplied reset vfunc.

This is required to fix some modesetting regressions across resume in
2.6.38:
https://bugzilla.kernel.org/show_bug.cgi?id=26952
https://bugzilla.kernel.org/show_bug.cgi?id=27272

Please review,
-Chris

 drivers/gpu/drm/drm_crtc.c   |   19 +++
 drivers/gpu/drm/i915/i915_drv.c  |2 ++
 drivers/gpu/drm/i915/intel_crt.c |   10 ++
 drivers/gpu/drm/i915/intel_display.c |   17 ++---
 include/drm/drm_crtc.h   |7 +++
 5 files changed, 52 insertions(+), 3 deletions(-)

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 2/4] drm/i915: Reset state after a GPU reset or resume

2011-01-24 Thread Chris Wilson
Call drm_mode_config_reset() after an invalidation event to restore any
cached state to unknown.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 66796bb..e517447 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -354,6 +354,7 @@ static int i915_drm_thaw(struct drm_device *dev)
error = i915_gem_init_ringbuffer(dev);
mutex_unlock(&dev->struct_mutex);
 
+   drm_mode_config_reset(dev);
drm_irq_install(dev);
 
/* Resume the modeset for every activated CRTC */
@@ -542,6 +543,7 @@ int i915_reset(struct drm_device *dev, u8 flags)
 
mutex_unlock(&dev->struct_mutex);
drm_irq_uninstall(dev);
+   drm_mode_config_reset(dev);
drm_irq_install(dev);
mutex_lock(&dev->struct_mutex);
}
-- 
1.7.2.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Chris Wilson
Iterate over the attached CRTCs, encoders and connectors and call the
supplied reset vfunc in order to reset any cached state back to unknown.
Useful after an invalidation event such as a GPU reset or resuming.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/drm_crtc.c |   19 +++
 include/drm/drm_crtc.h |7 +++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2baa670..6d7323d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2674,3 +2674,22 @@ out:
mutex_unlock(&dev->mode_config.mutex);
return ret;
 }
+
+void drm_mode_config_reset(struct drm_device *dev)
+{
+   struct drm_crtc *crtc;
+   struct drm_encoder *encoder;
+   struct drm_connector *connector;
+
+   list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
+   if (crtc->funcs->reset)
+   crtc->funcs->reset(crtc);
+
+   list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+   if (encoder->funcs->reset)
+   encoder->funcs->reset(encoder);
+
+   list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+   if (connector->funcs->reset)
+   connector->funcs->reset(connector);
+}
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index acd7fad..801be59 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -275,6 +275,7 @@ struct drm_pending_vblank_event;
 
 /**
  * drm_crtc_funcs - control CRTCs for a given device
+ * @reset: reset CRTC after state has been invalidate (e.g. resume)
  * @dpms: control display power levels
  * @save: save CRTC state
  * @resore: restore CRTC state
@@ -302,6 +303,8 @@ struct drm_crtc_funcs {
void (*save)(struct drm_crtc *crtc); /* suspend? */
/* Restore CRTC state */
void (*restore)(struct drm_crtc *crtc); /* resume? */
+   /* Reset CRTC state */
+   void (*reset)(struct drm_crtc *crtc);
 
/* cursor controls */
int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
@@ -379,6 +382,7 @@ struct drm_crtc {
  * @dpms: set power state (see drm_crtc_funcs above)
  * @save: save connector state
  * @restore: restore connector state
+ * @reset: reset connector after state has been invalidate (e.g. resume)
  * @mode_valid: is this mode valid on the given connector?
  * @mode_fixup: try to fixup proposed mode for this connector
  * @mode_set: set this mode
@@ -396,6 +400,7 @@ struct drm_connector_funcs {
void (*dpms)(struct drm_connector *connector, int mode);
void (*save)(struct drm_connector *connector);
void (*restore)(struct drm_connector *connector);
+   void (*reset)(struct drm_connector *connector);
 
/* Check to see if anything is attached to the connector.
 * @force is set to false whilst polling, true when checking the
@@ -413,6 +418,7 @@ struct drm_connector_funcs {
 };
 
 struct drm_encoder_funcs {
+   void (*reset)(struct drm_encoder *encoder);
void (*destroy)(struct drm_encoder *encoder);
 };
 
@@ -656,6 +662,7 @@ extern struct drm_display_mode *drm_mode_duplicate(struct 
drm_device *dev,
   struct drm_display_mode 
*mode);
 extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
 extern void drm_mode_config_init(struct drm_device *dev);
+extern void drm_mode_config_reset(struct drm_device *dev);
 extern void drm_mode_config_cleanup(struct drm_device *dev);
 extern void drm_mode_set_name(struct drm_display_mode *mode);
 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct 
drm_display_mode *mode2);
-- 
1.7.2.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 3/4] drm/i915/crt: Force the initial probe after reset

2011-01-24 Thread Chris Wilson
Upon resume, like after a cold boot, we need to forcibly probe the
analog connector and cannot rely on the hotplug status.

Based on a patch by Takashi Iwai.

Reported-by: Stefan Dirsch 
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=26952
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/intel_crt.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 17035b8..8a77ff4 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -535,6 +535,15 @@ static int intel_crt_set_property(struct drm_connector 
*connector,
return 0;
 }
 
+static void intel_crt_reset(struct drm_connector *connector)
+{
+   struct drm_device *dev = connector->dev;
+   struct intel_crt *crt = intel_attached_crt(connector);
+
+   if (HAS_PCH_SPLIT(dev))
+   crt->force_hotplug_required = 1;
+}
+
 /*
  * Routines for controlling stuff on the analog port
  */
@@ -548,6 +557,7 @@ static const struct drm_encoder_helper_funcs 
intel_crt_helper_funcs = {
 };
 
 static const struct drm_connector_funcs intel_crt_connector_funcs = {
+   .reset = intel_crt_reset,
.dpms = drm_helper_connector_dpms,
.detect = intel_crt_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
-- 
1.7.2.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 4/4] drm/i915: Reset crtc after resume

2011-01-24 Thread Chris Wilson
Based on a patch by Takashi Iwai.

Reported-by: Matthias Hopf 
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27272
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/intel_display.c |   17 ++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index d7f237d..7e42aa5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5551,6 +5551,18 @@ cleanup_work:
return ret;
 }
 
+static void intel_crtc_reset(struct drm_crtc *crtc)
+{
+   struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+   /* Reset flags back to the 'unknown' status so that they
+* will be correctly set on the initial modeset.
+*/
+   intel_crtc->cursor_addr = 0;
+   intel_crtc->dpms_mode = -1;
+   intel_crtc->active = true; /* force the pipe off on setup_init_config */
+}
+
 static struct drm_crtc_helper_funcs intel_helper_funcs = {
.dpms = intel_crtc_dpms,
.mode_fixup = intel_crtc_mode_fixup,
@@ -5562,6 +5574,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
 };
 
 static const struct drm_crtc_funcs intel_crtc_funcs = {
+   .reset = intel_crtc_reset,
.cursor_set = intel_crtc_cursor_set,
.cursor_move = intel_crtc_cursor_move,
.gamma_set = intel_crtc_gamma_set,
@@ -5652,9 +5665,7 @@ static void intel_crtc_init(struct drm_device *dev, int 
pipe)
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
 
-   intel_crtc->cursor_addr = 0;
-   intel_crtc->dpms_mode = -1;
-   intel_crtc->active = true; /* force the pipe off on setup_init_config */
+   intel_crtc_reset(&intel_crtc->base);
 
if (HAS_PCH_SPLIT(dev)) {
intel_helper_funcs.prepare = ironlake_crtc_prepare;
-- 
1.7.2.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Takashi Iwai
At Mon, 24 Jan 2011 15:55:28 +,
Chris Wilson wrote:
> 
> Iterate over the attached CRTCs, encoders and connectors and call the
> supplied reset vfunc in order to reset any cached state back to unknown.
> Useful after an invalidation event such as a GPU reset or resuming.
> 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/drm_crtc.c |   19 +++
>  include/drm/drm_crtc.h |7 +++
>  2 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 2baa670..6d7323d 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2674,3 +2674,22 @@ out:
>   mutex_unlock(&dev->mode_config.mutex);
>   return ret;
>  }
> +
> +void drm_mode_config_reset(struct drm_device *dev)
> +{
> + struct drm_crtc *crtc;
> + struct drm_encoder *encoder;
> + struct drm_connector *connector;
> +
> + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> + if (crtc->funcs->reset)
> + crtc->funcs->reset(crtc);
> +
> + list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
> + if (encoder->funcs->reset)
> + encoder->funcs->reset(encoder);
> +
> + list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> + if (connector->funcs->reset)
> + connector->funcs->reset(connector);
> +}

Missing EXPORT_SYMBOL()?


thanks,

Takashi
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Chris Wilson
On Mon, 24 Jan 2011 17:18:06 +0100, Takashi Iwai  wrote:
> Missing EXPORT_SYMBOL()?

Thanks. Modules are for the weak ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Add a reset interface

2011-01-24 Thread Takashi Iwai
At Mon, 24 Jan 2011 15:55:27 +,
Chris Wilson wrote:
> 
> For i915 there is a need to invalidate some cached state after resuming or
> reseting the GPU. This is not quite the same as simply restoring saved
> state (i.e. the standard suspend resume method), so do not seem to merit
> reusing the save|restore vfuncs.  Instead I propose a
> 
>drm_mode_config_reset(struct drm_device *);
> 
> routine to iterate over all the attached CRTCs, encoders and connectors
> and call any supplied reset vfunc.
> 
> This is required to fix some modesetting regressions across resume in
> 2.6.38:
> https://bugzilla.kernel.org/show_bug.cgi?id=26952
> https://bugzilla.kernel.org/show_bug.cgi?id=27272

I quickly tried these patches.  After adding the missing EXPORT_SYMBOL,
it seems working fine.  Tested on a SNB laptop and a PineView laptop.

Put my tag to all patches:
  Tested-by: Takashi Iwai 
  

Thanks!

Takashi
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #3 from julio prada  2011-01-24 08:47:40 PST ---
Hi Edgar, I have the same problem on a Toshiba laptop when I plug an external
monitor. This laptop has an Intel P6100 cpu which is part of the 2010 Core
family that integrates graphics on the cpu.
Did you solve the problem?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #4 from Edgar Villanueva  2011-01-24 
08:54:00 PST ---
I'm not sure this is the right bug as it sounds like you are using an intel
GPU.

This bug would probably be different for every GPU.

But if you are using a radeon GPU there are some fixes in the master branch
that I haven't tried yet.

I was told on a different bug that it's a PLL issue.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #5 from julio prada  2011-01-24 09:06:28 PST ---
I did not know if bugs were grouped by software or hardware, mine is an Intel
GPU, so Ill search for other reports and create mine if necessary. Anyway, if
you find your answer Id be very glad if you let me know. Thanks and have a nice
day.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Alex Deucher
On Mon, Jan 24, 2011 at 10:55 AM, Chris Wilson  wrote:
> Iterate over the attached CRTCs, encoders and connectors and call the
> supplied reset vfunc in order to reset any cached state back to unknown.
> Useful after an invalidation event such as a GPU reset or resuming.
>

Can't you just reprogram the modes at resume?  I guess it would help
to see what you are actually doing with this hook.

Alex

> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/drm_crtc.c |   19 +++
>  include/drm/drm_crtc.h     |    7 +++
>  2 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 2baa670..6d7323d 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2674,3 +2674,22 @@ out:
>        mutex_unlock(&dev->mode_config.mutex);
>        return ret;
>  }
> +
> +void drm_mode_config_reset(struct drm_device *dev)
> +{
> +       struct drm_crtc *crtc;
> +       struct drm_encoder *encoder;
> +       struct drm_connector *connector;
> +
> +       list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> +               if (crtc->funcs->reset)
> +                       crtc->funcs->reset(crtc);
> +
> +       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
> +               if (encoder->funcs->reset)
> +                       encoder->funcs->reset(encoder);
> +
> +       list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> +               if (connector->funcs->reset)
> +                       connector->funcs->reset(connector);
> +}
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index acd7fad..801be59 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -275,6 +275,7 @@ struct drm_pending_vblank_event;
>
>  /**
>  * drm_crtc_funcs - control CRTCs for a given device
> + * @reset: reset CRTC after state has been invalidate (e.g. resume)
>  * @dpms: control display power levels
>  * @save: save CRTC state
>  * @resore: restore CRTC state
> @@ -302,6 +303,8 @@ struct drm_crtc_funcs {
>        void (*save)(struct drm_crtc *crtc); /* suspend? */
>        /* Restore CRTC state */
>        void (*restore)(struct drm_crtc *crtc); /* resume? */
> +       /* Reset CRTC state */
> +       void (*reset)(struct drm_crtc *crtc);
>
>        /* cursor controls */
>        int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
> @@ -379,6 +382,7 @@ struct drm_crtc {
>  * @dpms: set power state (see drm_crtc_funcs above)
>  * @save: save connector state
>  * @restore: restore connector state
> + * @reset: reset connector after state has been invalidate (e.g. resume)
>  * @mode_valid: is this mode valid on the given connector?
>  * @mode_fixup: try to fixup proposed mode for this connector
>  * @mode_set: set this mode
> @@ -396,6 +400,7 @@ struct drm_connector_funcs {
>        void (*dpms)(struct drm_connector *connector, int mode);
>        void (*save)(struct drm_connector *connector);
>        void (*restore)(struct drm_connector *connector);
> +       void (*reset)(struct drm_connector *connector);
>
>        /* Check to see if anything is attached to the connector.
>         * @force is set to false whilst polling, true when checking the
> @@ -413,6 +418,7 @@ struct drm_connector_funcs {
>  };
>
>  struct drm_encoder_funcs {
> +       void (*reset)(struct drm_encoder *encoder);
>        void (*destroy)(struct drm_encoder *encoder);
>  };
>
> @@ -656,6 +662,7 @@ extern struct drm_display_mode *drm_mode_duplicate(struct 
> drm_device *dev,
>                                                   struct drm_display_mode 
> *mode);
>  extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
>  extern void drm_mode_config_init(struct drm_device *dev);
> +extern void drm_mode_config_reset(struct drm_device *dev);
>  extern void drm_mode_config_cleanup(struct drm_device *dev);
>  extern void drm_mode_set_name(struct drm_display_mode *mode);
>  extern bool drm_mode_equal(struct drm_display_mode *mode1, struct 
> drm_display_mode *mode2);
> --
> 1.7.2.3
>
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33418] New: Continuous GPU soft resets

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=33418

   Summary: Continuous GPU soft resets
   Product: DRI
   Version: XOrg CVS
  Platform: x86-64 (AMD64)
OS/Version: other
Status: NEW
  Severity: major
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: spamjunkea...@gmail.com


When I try to play nexuiz, neverball games. My NI (HD6850) got lock and soft
reset itself continuously.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33418] Continuous GPU soft resets

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=33418

--- Comment #1 from Erdem U. Altinyurt  2011-01-24 
10:36:47 PST ---
Using Mesa.xf86-video-ati and drm from latest git repo on linux 2.6.38-rc1 with
patch http://bugs.freedesktop.org/show_bug.cgi?id=33272.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/radeon/kms: add new radeon_info ioctl query for clock crystal freq

2011-01-24 Thread Alex Deucher
Needed for timer queries in the 3D driver.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/radeon_drv.c |2 +-
 drivers/gpu/drm/radeon/radeon_kms.c |4 
 include/drm/radeon_drm.h|1 +
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c 
b/drivers/gpu/drm/radeon/radeon_drv.c
index d5680a0..275b26a 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -48,7 +48,7 @@
  * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen
  * - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support 
(r300->r500)
  *   2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add 
eg dyn gpr regs
- *   2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, 
r300->r500 CMASK
+ *   2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, 
r300->r500 CMASK, clock crystal query
  */
 #define KMS_DRIVER_MAJOR   2
 #define KMS_DRIVER_MINOR   8
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
b/drivers/gpu/drm/radeon/radeon_kms.c
index 28a53e4..9832129 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -201,6 +201,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, 
struct drm_file *filp)
}
radeon_set_filp_rights(dev, &rdev->cmask_filp, filp, &value);
break;
+   case RADEON_INFO_CLOCK_CRYSTAL_FREQ:
+   /* return clock value in KHz */
+   value = rdev->clock.spll.reference_freq * 10;
+   break;
default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL;
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index e95a86b..e5c607a 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -907,6 +907,7 @@ struct drm_radeon_cs {
 #define RADEON_INFO_TILING_CONFIG  0x06
 #define RADEON_INFO_WANT_HYPERZ0x07
 #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
+#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
 
 struct drm_radeon_info {
uint32_trequest;
-- 
1.7.1.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26562] [bisected] blank screen with radeon.modeset=1

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26562





--- Comment #8 from Alex Deucher   2011-01-24 22:34:38 
---
This bug is a duplicate of bug 26552.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26552] Screen flickering with 2.6.37 [ATI X1600]

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26552





--- Comment #29 from Alex Deucher   2011-01-24 23:01:47 
---
Created an attachment (id=45032)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=45032)
combined patch

I think I've fixed everything.  Can you try this last patch by itself and make
sure all is working properly?  If you have any external monitors, can you test
them too?  I've tested this on all the hw I have an all seems well.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26562] [bisected] blank screen with radeon.modeset=1

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26562





--- Comment #9 from Alex Deucher   2011-01-24 23:03:12 
---
Can you try the patch in comment 29 of bug 26552:
https://bugzilla.kernel.org/show_bug.cgi?id=26552#c29
and make sure everything works ok?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26942] radeon: screen distortion on resume

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26942





--- Comment #10 from kernel...@sumoreor.com  2011-01-24 23:03:45 ---
Created an attachment (id=45042)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=45042)
avivotool regs all output for working and non working suspend

I am having the same problem on resume with kernel 2.6.37.  I have attached the
output of avivotool regs all for a working resume from 2.6.36 and a non-working
resume from 2.6.37.  Happy to get you anything else you need.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[git pull] drm-fixes

2011-01-24 Thread Dave Airlie

Hi Linus,

Mostly i915 serious fixes, along with some minor radeon changes.

(no global header files touched ;-)

Dave.

The following changes since commit d315777b32a4696feb86f2a0c9e9f39c94683649:

  Merge branch 'BUG_ON' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 
(2011-01-24 19:58:39 +1000)

are available in the git repository at:

  ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-fixes

Alex Deucher (5):
  drm/radeon/kms: fix a spelling error in an error message
  drm/radeon/kms: make the mac rv630 quirk generic
  drm/radeon/kms: match r6xx/r7xx/evergreen asic_reset with previous asics
  drm/radeon/kms: simplify atom adjust pll setup
  drm/radeon/kms: add new radeon_info ioctl query for clock crystal freq

Chris Wilson (12):
  drm/i915: Initialise ring vfuncs for old DRI paths
  drm/i915: Add dependency on CONFIG_TMPFS
  drm/i915: Don't kick-off hangcheck after a DRI interrupt
  drm/i915/ringbuffer: Fix use of stale HEAD position whilst polling for 
space
  drm/i915: Fix use of invalid array size for ring->sync_seqno
  drm/i915: Recognise non-VGA display devices
  drm/i915,agp/intel: Do not clear stolen entries
  drm/i915: Increase the amount of defense before computing vblank 
timestamps
  drm/i915: Disable high-precision vblank timestamping for UMS
  drm/i915: Handle the no-interrupts case for UMS by polling
  Merge remote branch 'linus/master' into drm-intel-fixes
  drm/i915: Prevent uninitialised reads during error state capture

Dave Airlie (1):
  Merge branch 'drm-intel-fixes-2' of 
ssh://master.kernel.org/.../ickle/drm-intel into drm-fixes

Jesse Barnes (2):
  drm/i915: set more FBC chicken bits
  drm/i915: make the blitter report buffer modifications to the FBC unit

Michael Karcher (1):
  drm/i915: Use consistent mappings for OpRegion between ACPI and i915

Michel Dänzer (1):
  drm/radeon/kms: Initialize pageflip spinlocks.

 drivers/char/agp/intel-gtt.c   |   19 +++---
 drivers/gpu/drm/Kconfig|3 +
 drivers/gpu/drm/i915/i915_dma.c|   35 +---
 drivers/gpu/drm/i915/i915_drv.c|5 +-
 drivers/gpu/drm/i915/i915_drv.h|5 +-
 drivers/gpu/drm/i915/i915_gem.c|   12 +++-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c|4 +
 drivers/gpu/drm/i915/i915_irq.c|   37 +---
 drivers/gpu/drm/i915/i915_reg.h|6 ++
 drivers/gpu/drm/i915/intel_display.c   |   25 -
 drivers/gpu/drm/i915/intel_opregion.c  |3 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c|   83 ++--
 drivers/gpu/drm/i915/intel_ringbuffer.h|3 +
 drivers/gpu/drm/radeon/atombios_crtc.c |   22 ++--
 drivers/gpu/drm/radeon/evergreen.c |3 +
 drivers/gpu/drm/radeon/r100.c  |2 +-
 drivers/gpu/drm/radeon/r600.c  |3 +
 drivers/gpu/drm/radeon/radeon_atombios.c   |   14 ++---
 drivers/gpu/drm/radeon/radeon_drv.c|2 +-
 drivers/gpu/drm/radeon/radeon_irq_kms.c|3 +
 drivers/gpu/drm/radeon/radeon_kms.c|4 +
 drivers/gpu/vga/vgaarb.c   |2 +-
 include/drm/radeon_drm.h   |1 +
 24 files changed, 203 insertions(+), 95 deletions(-)___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26562] [bisected] blank screen with radeon.modeset=1

2011-01-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=26562





--- Comment #10 from Sami Liedes   2011-01-25 00:00:26 ---
Yes, that patch works for me. Thanks.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/radeon/kms: only enable HDMI mode if radeon audio is enabled

2011-01-24 Thread Alex Deucher
Force DVI mode if the user specifies radeon.audio=0.  The driver
doesn't handle HDMI mode properly in some cases.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=27731

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/radeon_encoders.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c 
b/drivers/gpu/drm/radeon/radeon_encoders.c
index 8fd1842..5e90984 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -641,7 +641,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DVII:
case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog 
works fine */
-   if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
@@ -655,7 +655,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
case DRM_MODE_CONNECTOR_DVID:
case DRM_MODE_CONNECTOR_HDMIA:
default:
-   if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
@@ -673,7 +673,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
if ((dig_connector->dp_sink_type == 
CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
return ATOM_ENCODER_MODE_DP;
-   else if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   else if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
-- 
1.7.1.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/radeon/kms: clean up some magic numbers

2011-01-24 Thread Alex Deucher
Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/r100.c   |   10 +-
 drivers/gpu/drm/radeon/r300.c   |7 +--
 drivers/gpu/drm/radeon/r420.c   |2 +-
 drivers/gpu/drm/radeon/r520.c   |4 ++--
 drivers/gpu/drm/radeon/radeon_reg.h |2 ++
 drivers/gpu/drm/radeon/rs400.c  |   15 +--
 drivers/gpu/drm/radeon/rv515.c  |   10 +-
 7 files changed, 29 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 5968dde..5f15820 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1031,8 +1031,8 @@ int r100_cp_init(struct radeon_device *rdev, unsigned 
ring_size)
WREG32(RADEON_CP_CSQ_MODE,
   REG_SET(RADEON_INDIRECT2_START, indirect2_start) |
   REG_SET(RADEON_INDIRECT1_START, indirect1_start));
-   WREG32(0x718, 0);
-   WREG32(0x744, 0x4D4D);
+   WREG32(RADEON_CP_RB_WPTR_DELAY, 0);
+   WREG32(RADEON_CP_CSQ_MODE, 0x4D4D);
WREG32(RADEON_CP_CSQ_CNTL, RADEON_CSQ_PRIBM_INDBM);
radeon_ring_start(rdev);
r = radeon_ring_test(rdev);
@@ -2347,10 +2347,10 @@ void r100_vga_set_state(struct radeon_device *rdev, 
bool state)
 
temp = RREG32(RADEON_CONFIG_CNTL);
if (state == false) {
-   temp &= ~(1<<8);
-   temp |= (1<<9);
+   temp &= ~RADEON_CFG_VGA_RAM_EN;
+   temp |= RADEON_CFG_VGA_IO_DIS;
} else {
-   temp &= ~(1<<9);
+   temp &= ~RADEON_CFG_VGA_IO_DIS;
}
WREG32(RADEON_CONFIG_CNTL, temp);
 }
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index cf862ca..55fe5ba 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -69,6 +69,9 @@ void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
mb();
 }
 
+#define R300_PTE_WRITEABLE (1 << 2)
+#define R300_PTE_READABLE  (1 << 3)
+
 int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
 {
void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
@@ -78,7 +81,7 @@ int rv370_pcie_gart_set_page(struct radeon_device *rdev, int 
i, uint64_t addr)
}
addr = (lower_32_bits(addr) >> 8) |
   ((upper_32_bits(addr) & 0xff) << 24) |
-  0xc;
+  R300_PTE_WRITEABLE | R300_PTE_READABLE;
/* on x86 we want this to be CPU endian, on powerpc
 * on powerpc without HW swappers, it'll get swapped on way
 * into VRAM - so no need for cpu_to_le32 on VRAM tables */
@@ -135,7 +138,7 @@ int rv370_pcie_gart_enable(struct radeon_device *rdev)
WREG32_PCIE(RADEON_PCIE_TX_DISCARD_RD_ADDR_LO, rdev->mc.vram_start);
WREG32_PCIE(RADEON_PCIE_TX_DISCARD_RD_ADDR_HI, 0);
/* Clear error */
-   WREG32_PCIE(0x18, 0);
+   WREG32_PCIE(RADEON_PCIE_TX_GART_ERROR, 0);
tmp = RREG32_PCIE(RADEON_PCIE_TX_GART_CNTL);
tmp |= RADEON_PCIE_TX_GART_EN;
tmp |= RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD;
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c
index c387346..0b59ed7 100644
--- a/drivers/gpu/drm/radeon/r420.c
+++ b/drivers/gpu/drm/radeon/r420.c
@@ -96,7 +96,7 @@ void r420_pipes_init(struct radeon_device *rdev)
   "programming pipes. Bad things might happen.\n");
}
/* get max number of pipes */
-   gb_pipe_select = RREG32(0x402C);
+   gb_pipe_select = RREG32(R400_GB_PIPE_SELECT);
num_pipes = ((gb_pipe_select >> 12) & 3) + 1;
 
/* SE chips have 1 pipe */
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c
index 3c8677f..2ce80d9 100644
--- a/drivers/gpu/drm/radeon/r520.c
+++ b/drivers/gpu/drm/radeon/r520.c
@@ -79,8 +79,8 @@ static void r520_gpu_init(struct radeon_device *rdev)
WREG32(0x4128, 0xFF);
}
r420_pipes_init(rdev);
-   gb_pipe_select = RREG32(0x402C);
-   tmp = RREG32(0x170C);
+   gb_pipe_select = RREG32(R400_GB_PIPE_SELECT);
+   tmp = RREG32(R300_DST_PIPE_CONFIG);
pipe_select_current = (tmp >> 2) & 3;
tmp = (1 << pipe_select_current) |
  (((gb_pipe_select >> 8) & 0xF) << 4);
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h 
b/drivers/gpu/drm/radeon/radeon_reg.h
index 3cd4dac..ec93a75 100644
--- a/drivers/gpu/drm/radeon/radeon_reg.h
+++ b/drivers/gpu/drm/radeon/radeon_reg.h
@@ -375,6 +375,8 @@
 #define RADEON_CONFIG_APER_SIZE 0x0108
 #define RADEON_CONFIG_BONDS 0x00e8
 #define RADEON_CONFIG_CNTL  0x00e0
+#   define RADEON_CFG_VGA_RAM_EN(1 << 8)
+#   define RADEON_CFG_VGA_IO_DIS(1 << 9)
 #   define RADEON_CFG_ATI_REV_A11   (0   << 16)
 #   define RADEON_CFG_ATI_REV_A12   (1   << 16)
 #   define RADEON_CFG_ATI_REV_A13   (2   << 16)
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/

[Bug 29851] [r300g] HyperZ on RS690 not work correctly

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29851

--- Comment #9 from Marek Olšák  2011-01-24 20:57:51 PST ---
Created an attachment (id=42432)
 View: https://bugs.freedesktop.org/attachment.cgi?id=42432
 Review: https://bugs.freedesktop.org/review?bug=29851&attachment=42432

possible fix

Does the attached patch fix anything?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32296] [r300g] Screen corruption with WoW when HyperZ enabled.

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32296

--- Comment #5 from Marek Olšák  2011-01-24 20:59:04 PST ---
Does this patch fix anything?

https://bugs.freedesktop.org/attachment.cgi?id=42432

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32945] Lower part of the screen corrupt with HyperZ enabled

2011-01-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=32945

--- Comment #3 from Marek Olšák  2011-01-24 21:00:14 PST ---
Does this patch fix anything?

https://bugs.freedesktop.org/attachment.cgi?id=42432

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 26942] radeon: screen distortion on resume

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26942





--- Comment #9 from Alex Deucher   2011-01-24 
05:25:57 ---
The changes in that patch should only affect those regs I asked you to dump,
but they are the same before and after.  Can you attach the output of:
avivotool regs all
before and after?
If that gives you any problems, try just dumping the pll regs:
avivotool regmatch 
where  =
0x400
0x404
0x408
0x40c
0x410
0x414
0x418
0x41c
0x420
0x424
0x430
0x434
0x438
0x43c
0x440
0x444
0x448
0x44c
0x450
0x454

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 31830] [bisected] broken shadows in Unigine Sanctuary and Lightsmark

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31830

--- Comment #5 from Tom Stellard  2011-01-24 01:13:49 
PST ---
Created an attachment (id=42355)
 View: https://bugs.freedesktop.org/attachment.cgi?id=42355
 Review: https://bugs.freedesktop.org/review?bug=31830&attachment=42355

Possible Fix

I think this patch fixes Lightsmark, can you confirm this?  Does this patch fix
Sanctuary as well?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 33399] New: No HDMI PCM mutichannel audio

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=33399

   Summary: No HDMI PCM mutichannel audio
   Product: DRI
   Version: XOrg CVS
  Platform: All
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: xavier.bestel at free.fr


Hi,

using a HD 2600, audio over HDMI is stereo-only. The only mean to have
multichannel (e.g. 5.1) is to use passthrough, but true multichannel (e.g. 8
channels PCM) isn't supported by the driver, although it should be supported by
the HDMI standard.

Here's the excerpt from alsa-info.sh concerning the card:
Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x10
No Modem Function Group found
Default PCM:
rates [0x40]: 48000
bits [0x2]: 16
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x201: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Device: name="HDMI 0", type="HDMI", device=3
  Converter: stream=1, channel=0
  Digital: Enabled GenLevel
  Digital category: 0x2
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x0094: OUT Detect HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
 0x02


Full data is at
http://www.alsa-project.org/db/?f=b3f67a0890f9878b7b3f345578e24eda0aaa59ac

Thanks,
Xav

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 33185] X crashes when kWin effects are turned on

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=33185

--- Comment #4 from Michel D?nzer  2011-01-24 02:47:57 
PST ---
(In reply to comment #2)
> do you mean I have to install debugging symbols when kWin crashes (in its
> dialogue window)? Is it sufficient?

I don't know if it's possible/sufficient at that point. Better install them
before reproducing the problem.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32544

Michel D?nzer  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Michel D?nzer  2011-01-24 02:54:12 
PST ---
Jakob pushed a driver-independent solution in commit
4c73030d47f39441d718157f7d9a59c136bbfac0 ('draw: Init llvm if not provided').

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


Broken locking in ttm_bo_swapout

2011-01-24 Thread Maarten Maathuis
On Thu, Jan 20, 2011 at 7:53 PM, Matthew Bullock
 wrote:
> I have a fairly simple opengl application running on nouveau. It effectively
> just plots a couple of very large images that change regularly.
>
> I've been getting an easily repeatable failure, hitting the
> BUG_ON(in_interrupt) in vfree() that is called during ttm_shrink_work().
> Obviously vfree() is being called with a lock held...
>
> Looking at the locking up through the stack trace, there's an obvious
> mistake:
>
> There should be a:
> spin_lock(&glob->lru_lock);
> before the continue in ttm_bo_swapout() in drivers/gpu/drm/ttm/ttm_bo.c
>
> --- ttm_bo.c~ ? 2011-01-05 00:50:19.0 +
> +++ ttm_bo.c ? ?2011-01-20 18:11:57.262813765 +
> @@ -1761,6 +1761,7 @@ static int ttm_bo_swapout(struct ttm_mem
> ? ? ? ? ? ? ? ? ? ? ? ?spin_unlock(&glob->lru_lock);
> ? ? ? ? ? ? ? ? ? ? ? ?(void) ttm_bo_cleanup_refs(bo, false, false, false);
> ? ? ? ? ? ? ? ? ? ? ? ?kref_put(&bo->list_kref, ttm_bo_release_list);
> + ? ? ? ? ? ? ? ? ? ? ? spin_lock(&glob->lru_lock);
> ? ? ? ? ? ? ? ? ? ? ? ?continue;
> ? ? ? ? ? ? ? ?}
>
> That fixes the problem for me.
>
> Matthew
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

This seems (very) plausible, maybe someone who commits drm patches
frequently will see this message now.

It would be a shame to forget about this e-mail.

Maarten.

-- 
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.


[Bug 26552] Screen flickering with 2.6.37 [ATI X1600]

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26552





--- Comment #28 from Daniel   2011-01-24 12:56:04 
---
Okay Alex, the patch of #20 on top of #8 plus the second mini patch from #10
seems to be stable for me. The last days i had no more flickering and no black
screens.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[RFC PATCH v2] Utilize the PCI API in the TTM framework.

2011-01-24 Thread Konrad Rzeszutek Wilk
On Wed, Jan 12, 2011 at 10:19:39AM -0500, Konrad Rzeszutek Wilk wrote:
> On Wed, Jan 12, 2011 at 10:12:14AM +0100, Thomas Hellstrom wrote:
> > Hi, Konrad.
> > 
> > This discussion has become a bit lenghty. I'll filter out the
> > sorted-out stuff, which leaves me with two remaining issues:
> 
> 

ping?

... did I miss some extra discussion?


Add a reset interface

2011-01-24 Thread Chris Wilson
For i915 there is a need to invalidate some cached state after resuming or
reseting the GPU. This is not quite the same as simply restoring saved
state (i.e. the standard suspend resume method), so do not seem to merit
reusing the save|restore vfuncs.  Instead I propose a

   drm_mode_config_reset(struct drm_device *);

routine to iterate over all the attached CRTCs, encoders and connectors
and call any supplied reset vfunc.

This is required to fix some modesetting regressions across resume in
2.6.38:
https://bugzilla.kernel.org/show_bug.cgi?id=26952
https://bugzilla.kernel.org/show_bug.cgi?id=27272

Please review,
-Chris

 drivers/gpu/drm/drm_crtc.c   |   19 +++
 drivers/gpu/drm/i915/i915_drv.c  |2 ++
 drivers/gpu/drm/i915/intel_crt.c |   10 ++
 drivers/gpu/drm/i915/intel_display.c |   17 ++---
 include/drm/drm_crtc.h   |7 +++
 5 files changed, 52 insertions(+), 3 deletions(-)



[PATCH 2/4] drm/i915: Reset state after a GPU reset or resume

2011-01-24 Thread Chris Wilson
Call drm_mode_config_reset() after an invalidation event to restore any
cached state to unknown.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 66796bb..e517447 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -354,6 +354,7 @@ static int i915_drm_thaw(struct drm_device *dev)
error = i915_gem_init_ringbuffer(dev);
mutex_unlock(&dev->struct_mutex);

+   drm_mode_config_reset(dev);
drm_irq_install(dev);

/* Resume the modeset for every activated CRTC */
@@ -542,6 +543,7 @@ int i915_reset(struct drm_device *dev, u8 flags)

mutex_unlock(&dev->struct_mutex);
drm_irq_uninstall(dev);
+   drm_mode_config_reset(dev);
drm_irq_install(dev);
mutex_lock(&dev->struct_mutex);
}
-- 
1.7.2.3



[PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Chris Wilson
Iterate over the attached CRTCs, encoders and connectors and call the
supplied reset vfunc in order to reset any cached state back to unknown.
Useful after an invalidation event such as a GPU reset or resuming.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/drm_crtc.c |   19 +++
 include/drm/drm_crtc.h |7 +++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2baa670..6d7323d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2674,3 +2674,22 @@ out:
mutex_unlock(&dev->mode_config.mutex);
return ret;
 }
+
+void drm_mode_config_reset(struct drm_device *dev)
+{
+   struct drm_crtc *crtc;
+   struct drm_encoder *encoder;
+   struct drm_connector *connector;
+
+   list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
+   if (crtc->funcs->reset)
+   crtc->funcs->reset(crtc);
+
+   list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+   if (encoder->funcs->reset)
+   encoder->funcs->reset(encoder);
+
+   list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+   if (connector->funcs->reset)
+   connector->funcs->reset(connector);
+}
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index acd7fad..801be59 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -275,6 +275,7 @@ struct drm_pending_vblank_event;

 /**
  * drm_crtc_funcs - control CRTCs for a given device
+ * @reset: reset CRTC after state has been invalidate (e.g. resume)
  * @dpms: control display power levels
  * @save: save CRTC state
  * @resore: restore CRTC state
@@ -302,6 +303,8 @@ struct drm_crtc_funcs {
void (*save)(struct drm_crtc *crtc); /* suspend? */
/* Restore CRTC state */
void (*restore)(struct drm_crtc *crtc); /* resume? */
+   /* Reset CRTC state */
+   void (*reset)(struct drm_crtc *crtc);

/* cursor controls */
int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
@@ -379,6 +382,7 @@ struct drm_crtc {
  * @dpms: set power state (see drm_crtc_funcs above)
  * @save: save connector state
  * @restore: restore connector state
+ * @reset: reset connector after state has been invalidate (e.g. resume)
  * @mode_valid: is this mode valid on the given connector?
  * @mode_fixup: try to fixup proposed mode for this connector
  * @mode_set: set this mode
@@ -396,6 +400,7 @@ struct drm_connector_funcs {
void (*dpms)(struct drm_connector *connector, int mode);
void (*save)(struct drm_connector *connector);
void (*restore)(struct drm_connector *connector);
+   void (*reset)(struct drm_connector *connector);

/* Check to see if anything is attached to the connector.
 * @force is set to false whilst polling, true when checking the
@@ -413,6 +418,7 @@ struct drm_connector_funcs {
 };

 struct drm_encoder_funcs {
+   void (*reset)(struct drm_encoder *encoder);
void (*destroy)(struct drm_encoder *encoder);
 };

@@ -656,6 +662,7 @@ extern struct drm_display_mode *drm_mode_duplicate(struct 
drm_device *dev,
   struct drm_display_mode 
*mode);
 extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
 extern void drm_mode_config_init(struct drm_device *dev);
+extern void drm_mode_config_reset(struct drm_device *dev);
 extern void drm_mode_config_cleanup(struct drm_device *dev);
 extern void drm_mode_set_name(struct drm_display_mode *mode);
 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct 
drm_display_mode *mode2);
-- 
1.7.2.3



[PATCH 3/4] drm/i915/crt: Force the initial probe after reset

2011-01-24 Thread Chris Wilson
Upon resume, like after a cold boot, we need to forcibly probe the
analog connector and cannot rely on the hotplug status.

Based on a patch by Takashi Iwai.

Reported-by: Stefan Dirsch 
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=26952
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/intel_crt.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 17035b8..8a77ff4 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -535,6 +535,15 @@ static int intel_crt_set_property(struct drm_connector 
*connector,
return 0;
 }

+static void intel_crt_reset(struct drm_connector *connector)
+{
+   struct drm_device *dev = connector->dev;
+   struct intel_crt *crt = intel_attached_crt(connector);
+
+   if (HAS_PCH_SPLIT(dev))
+   crt->force_hotplug_required = 1;
+}
+
 /*
  * Routines for controlling stuff on the analog port
  */
@@ -548,6 +557,7 @@ static const struct drm_encoder_helper_funcs 
intel_crt_helper_funcs = {
 };

 static const struct drm_connector_funcs intel_crt_connector_funcs = {
+   .reset = intel_crt_reset,
.dpms = drm_helper_connector_dpms,
.detect = intel_crt_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
-- 
1.7.2.3



[PATCH 4/4] drm/i915: Reset crtc after resume

2011-01-24 Thread Chris Wilson
Based on a patch by Takashi Iwai.

Reported-by: Matthias Hopf 
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27272
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/intel_display.c |   17 ++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index d7f237d..7e42aa5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5551,6 +5551,18 @@ cleanup_work:
return ret;
 }

+static void intel_crtc_reset(struct drm_crtc *crtc)
+{
+   struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+   /* Reset flags back to the 'unknown' status so that they
+* will be correctly set on the initial modeset.
+*/
+   intel_crtc->cursor_addr = 0;
+   intel_crtc->dpms_mode = -1;
+   intel_crtc->active = true; /* force the pipe off on setup_init_config */
+}
+
 static struct drm_crtc_helper_funcs intel_helper_funcs = {
.dpms = intel_crtc_dpms,
.mode_fixup = intel_crtc_mode_fixup,
@@ -5562,6 +5574,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
 };

 static const struct drm_crtc_funcs intel_crtc_funcs = {
+   .reset = intel_crtc_reset,
.cursor_set = intel_crtc_cursor_set,
.cursor_move = intel_crtc_cursor_move,
.gamma_set = intel_crtc_gamma_set,
@@ -5652,9 +5665,7 @@ static void intel_crtc_init(struct drm_device *dev, int 
pipe)
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;

-   intel_crtc->cursor_addr = 0;
-   intel_crtc->dpms_mode = -1;
-   intel_crtc->active = true; /* force the pipe off on setup_init_config */
+   intel_crtc_reset(&intel_crtc->base);

if (HAS_PCH_SPLIT(dev)) {
intel_helper_funcs.prepare = ironlake_crtc_prepare;
-- 
1.7.2.3



[PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Takashi Iwai
At Mon, 24 Jan 2011 15:55:28 +,
Chris Wilson wrote:
> 
> Iterate over the attached CRTCs, encoders and connectors and call the
> supplied reset vfunc in order to reset any cached state back to unknown.
> Useful after an invalidation event such as a GPU reset or resuming.
> 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/drm_crtc.c |   19 +++
>  include/drm/drm_crtc.h |7 +++
>  2 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 2baa670..6d7323d 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2674,3 +2674,22 @@ out:
>   mutex_unlock(&dev->mode_config.mutex);
>   return ret;
>  }
> +
> +void drm_mode_config_reset(struct drm_device *dev)
> +{
> + struct drm_crtc *crtc;
> + struct drm_encoder *encoder;
> + struct drm_connector *connector;
> +
> + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> + if (crtc->funcs->reset)
> + crtc->funcs->reset(crtc);
> +
> + list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
> + if (encoder->funcs->reset)
> + encoder->funcs->reset(encoder);
> +
> + list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> + if (connector->funcs->reset)
> + connector->funcs->reset(connector);
> +}

Missing EXPORT_SYMBOL()?


thanks,

Takashi


[PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Chris Wilson
On Mon, 24 Jan 2011 17:18:06 +0100, Takashi Iwai  wrote:
> Missing EXPORT_SYMBOL()?

Thanks. Modules are for the weak ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


Add a reset interface

2011-01-24 Thread Takashi Iwai
At Mon, 24 Jan 2011 15:55:27 +,
Chris Wilson wrote:
> 
> For i915 there is a need to invalidate some cached state after resuming or
> reseting the GPU. This is not quite the same as simply restoring saved
> state (i.e. the standard suspend resume method), so do not seem to merit
> reusing the save|restore vfuncs.  Instead I propose a
> 
>drm_mode_config_reset(struct drm_device *);
> 
> routine to iterate over all the attached CRTCs, encoders and connectors
> and call any supplied reset vfunc.
> 
> This is required to fix some modesetting regressions across resume in
> 2.6.38:
> https://bugzilla.kernel.org/show_bug.cgi?id=26952
> https://bugzilla.kernel.org/show_bug.cgi?id=27272

I quickly tried these patches.  After adding the missing EXPORT_SYMBOL,
it seems working fine.  Tested on a SNB laptop and a PineView laptop.

Put my tag to all patches:
  Tested-by: Takashi Iwai 


Thanks!

Takashi


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #3 from julio prada  2011-01-24 08:47:40 PST 
---
Hi Edgar, I have the same problem on a Toshiba laptop when I plug an external
monitor. This laptop has an Intel P6100 cpu which is part of the 2010 Core
family that integrates graphics on the cpu.
Did you solve the problem?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #4 from Edgar Villanueva  2011-01-24 
08:54:00 PST ---
I'm not sure this is the right bug as it sounds like you are using an intel
GPU.

This bug would probably be different for every GPU.

But if you are using a radeon GPU there are some fixes in the master branch
that I haven't tried yet.

I was told on a different bug that it's a PLL issue.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32399] KMS:RS480:X200M LCD Monitor on VGA-0 shows wavy picture

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32399

--- Comment #5 from julio prada  2011-01-24 09:06:28 PST 
---
I did not know if bugs were grouped by software or hardware, mine is an Intel
GPU, so Ill search for other reports and create mine if necessary. Anyway, if
you find your answer Id be very glad if you let me know. Thanks and have a nice
day.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[PATCH 1/4] drm: Add an interface to reset the device

2011-01-24 Thread Alex Deucher
On Mon, Jan 24, 2011 at 10:55 AM, Chris Wilson  
wrote:
> Iterate over the attached CRTCs, encoders and connectors and call the
> supplied reset vfunc in order to reset any cached state back to unknown.
> Useful after an invalidation event such as a GPU reset or resuming.
>

Can't you just reprogram the modes at resume?  I guess it would help
to see what you are actually doing with this hook.

Alex

> Signed-off-by: Chris Wilson 
> ---
> ?drivers/gpu/drm/drm_crtc.c | ? 19 +++
> ?include/drm/drm_crtc.h ? ? | ? ?7 +++
> ?2 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 2baa670..6d7323d 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2674,3 +2674,22 @@ out:
> ? ? ? ?mutex_unlock(&dev->mode_config.mutex);
> ? ? ? ?return ret;
> ?}
> +
> +void drm_mode_config_reset(struct drm_device *dev)
> +{
> + ? ? ? struct drm_crtc *crtc;
> + ? ? ? struct drm_encoder *encoder;
> + ? ? ? struct drm_connector *connector;
> +
> + ? ? ? list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> + ? ? ? ? ? ? ? if (crtc->funcs->reset)
> + ? ? ? ? ? ? ? ? ? ? ? crtc->funcs->reset(crtc);
> +
> + ? ? ? list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
> + ? ? ? ? ? ? ? if (encoder->funcs->reset)
> + ? ? ? ? ? ? ? ? ? ? ? encoder->funcs->reset(encoder);
> +
> + ? ? ? list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> + ? ? ? ? ? ? ? if (connector->funcs->reset)
> + ? ? ? ? ? ? ? ? ? ? ? connector->funcs->reset(connector);
> +}
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index acd7fad..801be59 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -275,6 +275,7 @@ struct drm_pending_vblank_event;
>
> ?/**
> ?* drm_crtc_funcs - control CRTCs for a given device
> + * @reset: reset CRTC after state has been invalidate (e.g. resume)
> ?* @dpms: control display power levels
> ?* @save: save CRTC state
> ?* @resore: restore CRTC state
> @@ -302,6 +303,8 @@ struct drm_crtc_funcs {
> ? ? ? ?void (*save)(struct drm_crtc *crtc); /* suspend? */
> ? ? ? ?/* Restore CRTC state */
> ? ? ? ?void (*restore)(struct drm_crtc *crtc); /* resume? */
> + ? ? ? /* Reset CRTC state */
> + ? ? ? void (*reset)(struct drm_crtc *crtc);
>
> ? ? ? ?/* cursor controls */
> ? ? ? ?int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
> @@ -379,6 +382,7 @@ struct drm_crtc {
> ?* @dpms: set power state (see drm_crtc_funcs above)
> ?* @save: save connector state
> ?* @restore: restore connector state
> + * @reset: reset connector after state has been invalidate (e.g. resume)
> ?* @mode_valid: is this mode valid on the given connector?
> ?* @mode_fixup: try to fixup proposed mode for this connector
> ?* @mode_set: set this mode
> @@ -396,6 +400,7 @@ struct drm_connector_funcs {
> ? ? ? ?void (*dpms)(struct drm_connector *connector, int mode);
> ? ? ? ?void (*save)(struct drm_connector *connector);
> ? ? ? ?void (*restore)(struct drm_connector *connector);
> + ? ? ? void (*reset)(struct drm_connector *connector);
>
> ? ? ? ?/* Check to see if anything is attached to the connector.
> ? ? ? ? * @force is set to false whilst polling, true when checking the
> @@ -413,6 +418,7 @@ struct drm_connector_funcs {
> ?};
>
> ?struct drm_encoder_funcs {
> + ? ? ? void (*reset)(struct drm_encoder *encoder);
> ? ? ? ?void (*destroy)(struct drm_encoder *encoder);
> ?};
>
> @@ -656,6 +662,7 @@ extern struct drm_display_mode *drm_mode_duplicate(struct 
> drm_device *dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct drm_display_mode 
> *mode);
> ?extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
> ?extern void drm_mode_config_init(struct drm_device *dev);
> +extern void drm_mode_config_reset(struct drm_device *dev);
> ?extern void drm_mode_config_cleanup(struct drm_device *dev);
> ?extern void drm_mode_set_name(struct drm_display_mode *mode);
> ?extern bool drm_mode_equal(struct drm_display_mode *mode1, struct 
> drm_display_mode *mode2);
> --
> 1.7.2.3
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>


[Bug 33418] New: Continuous GPU soft resets

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=33418

   Summary: Continuous GPU soft resets
   Product: DRI
   Version: XOrg CVS
  Platform: x86-64 (AMD64)
OS/Version: other
Status: NEW
  Severity: major
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: spamjunkeater at gmail.com


When I try to play nexuiz, neverball games. My NI (HD6850) got lock and soft
reset itself continuously.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 33418] Continuous GPU soft resets

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=33418

--- Comment #1 from Erdem U. Altinyurt  2011-01-24 
10:36:47 PST ---
Using Mesa.xf86-video-ati and drm from latest git repo on linux 2.6.38-rc1 with
patch http://bugs.freedesktop.org/show_bug.cgi?id=33272.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[PATCH] drm/radeon/kms: add new radeon_info ioctl query for clock crystal freq

2011-01-24 Thread Alex Deucher
Needed for timer queries in the 3D driver.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/radeon_drv.c |2 +-
 drivers/gpu/drm/radeon/radeon_kms.c |4 
 include/drm/radeon_drm.h|1 +
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c 
b/drivers/gpu/drm/radeon/radeon_drv.c
index d5680a0..275b26a 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -48,7 +48,7 @@
  * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen
  * - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support 
(r300->r500)
  *   2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add 
eg dyn gpr regs
- *   2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, 
r300->r500 CMASK
+ *   2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, 
r300->r500 CMASK, clock crystal query
  */
 #define KMS_DRIVER_MAJOR   2
 #define KMS_DRIVER_MINOR   8
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
b/drivers/gpu/drm/radeon/radeon_kms.c
index 28a53e4..9832129 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -201,6 +201,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, 
struct drm_file *filp)
}
radeon_set_filp_rights(dev, &rdev->cmask_filp, filp, &value);
break;
+   case RADEON_INFO_CLOCK_CRYSTAL_FREQ:
+   /* return clock value in KHz */
+   value = rdev->clock.spll.reference_freq * 10;
+   break;
default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL;
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index e95a86b..e5c607a 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -907,6 +907,7 @@ struct drm_radeon_cs {
 #define RADEON_INFO_TILING_CONFIG  0x06
 #define RADEON_INFO_WANT_HYPERZ0x07
 #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
+#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */

 struct drm_radeon_info {
uint32_trequest;
-- 
1.7.1.1



[Bug 26562] [bisected] blank screen with radeon.modeset=1

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26562





--- Comment #8 from Alex Deucher   2011-01-24 
22:34:38 ---
This bug is a duplicate of bug 26552.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26552] Screen flickering with 2.6.37 [ATI X1600]

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26552





--- Comment #29 from Alex Deucher   2011-01-24 
23:01:47 ---
Created an attachment (id=45032)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=45032)
combined patch

I think I've fixed everything.  Can you try this last patch by itself and make
sure all is working properly?  If you have any external monitors, can you test
them too?  I've tested this on all the hw I have an all seems well.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26562] [bisected] blank screen with radeon.modeset=1

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26562





--- Comment #9 from Alex Deucher   2011-01-24 
23:03:12 ---
Can you try the patch in comment 29 of bug 26552:
https://bugzilla.kernel.org/show_bug.cgi?id=26552#c29
and make sure everything works ok?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26942] radeon: screen distortion on resume

2011-01-24 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=26942





--- Comment #10 from kernelbug at sumoreor.com  2011-01-24 23:03:45 ---
Created an attachment (id=45042)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=45042)
avivotool regs all output for working and non working suspend

I am having the same problem on resume with kernel 2.6.37.  I have attached the
output of avivotool regs all for a working resume from 2.6.36 and a non-working
resume from 2.6.37.  Happy to get you anything else you need.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[git pull] drm-fixes

2011-01-24 Thread Dave Airlie

Hi Linus,

Mostly i915 serious fixes, along with some minor radeon changes.

(no global header files touched ;-)

Dave.

The following changes since commit d315777b32a4696feb86f2a0c9e9f39c94683649:

  Merge branch 'BUG_ON' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 
(2011-01-24 19:58:39 +1000)

are available in the git repository at:

  ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-fixes

Alex Deucher (5):
  drm/radeon/kms: fix a spelling error in an error message
  drm/radeon/kms: make the mac rv630 quirk generic
  drm/radeon/kms: match r6xx/r7xx/evergreen asic_reset with previous asics
  drm/radeon/kms: simplify atom adjust pll setup
  drm/radeon/kms: add new radeon_info ioctl query for clock crystal freq

Chris Wilson (12):
  drm/i915: Initialise ring vfuncs for old DRI paths
  drm/i915: Add dependency on CONFIG_TMPFS
  drm/i915: Don't kick-off hangcheck after a DRI interrupt
  drm/i915/ringbuffer: Fix use of stale HEAD position whilst polling for 
space
  drm/i915: Fix use of invalid array size for ring->sync_seqno
  drm/i915: Recognise non-VGA display devices
  drm/i915,agp/intel: Do not clear stolen entries
  drm/i915: Increase the amount of defense before computing vblank 
timestamps
  drm/i915: Disable high-precision vblank timestamping for UMS
  drm/i915: Handle the no-interrupts case for UMS by polling
  Merge remote branch 'linus/master' into drm-intel-fixes
  drm/i915: Prevent uninitialised reads during error state capture

Dave Airlie (1):
  Merge branch 'drm-intel-fixes-2' of 
ssh://master.kernel.org/.../ickle/drm-intel into drm-fixes

Jesse Barnes (2):
  drm/i915: set more FBC chicken bits
  drm/i915: make the blitter report buffer modifications to the FBC unit

Michael Karcher (1):
  drm/i915: Use consistent mappings for OpRegion between ACPI and i915

Michel D?nzer (1):
  drm/radeon/kms: Initialize pageflip spinlocks.

 drivers/char/agp/intel-gtt.c   |   19 +++---
 drivers/gpu/drm/Kconfig|3 +
 drivers/gpu/drm/i915/i915_dma.c|   35 +---
 drivers/gpu/drm/i915/i915_drv.c|5 +-
 drivers/gpu/drm/i915/i915_drv.h|5 +-
 drivers/gpu/drm/i915/i915_gem.c|   12 +++-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c|4 +
 drivers/gpu/drm/i915/i915_irq.c|   37 +---
 drivers/gpu/drm/i915/i915_reg.h|6 ++
 drivers/gpu/drm/i915/intel_display.c   |   25 -
 drivers/gpu/drm/i915/intel_opregion.c  |3 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c|   83 ++--
 drivers/gpu/drm/i915/intel_ringbuffer.h|3 +
 drivers/gpu/drm/radeon/atombios_crtc.c |   22 ++--
 drivers/gpu/drm/radeon/evergreen.c |3 +
 drivers/gpu/drm/radeon/r100.c  |2 +-
 drivers/gpu/drm/radeon/r600.c  |3 +
 drivers/gpu/drm/radeon/radeon_atombios.c   |   14 ++---
 drivers/gpu/drm/radeon/radeon_drv.c|2 +-
 drivers/gpu/drm/radeon/radeon_irq_kms.c|3 +
 drivers/gpu/drm/radeon/radeon_kms.c|4 +
 drivers/gpu/vga/vgaarb.c   |2 +-
 include/drm/radeon_drm.h   |1 +
 24 files changed, 203 insertions(+), 95 deletions(-)


[PATCH] drm/radeon/kms: only enable HDMI mode if radeon audio is enabled

2011-01-24 Thread Alex Deucher
Force DVI mode if the user specifies radeon.audio=0.  The driver
doesn't handle HDMI mode properly in some cases.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=27731

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/radeon_encoders.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c 
b/drivers/gpu/drm/radeon/radeon_encoders.c
index 8fd1842..5e90984 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -641,7 +641,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DVII:
case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog 
works fine */
-   if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
@@ -655,7 +655,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
case DRM_MODE_CONNECTOR_DVID:
case DRM_MODE_CONNECTOR_HDMIA:
default:
-   if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
@@ -673,7 +673,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
if ((dig_connector->dp_sink_type == 
CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
return ATOM_ENCODER_MODE_DP;
-   else if (drm_detect_monitor_audio(radeon_connector->edid)) {
+   else if (drm_detect_monitor_audio(radeon_connector->edid) && 
radeon_audio) {
/* fix me */
if (ASIC_IS_DCE4(rdev))
return ATOM_ENCODER_MODE_DVI;
-- 
1.7.1.1



[PATCH] drm/radeon/kms: clean up some magic numbers

2011-01-24 Thread Alex Deucher
Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/r100.c   |   10 +-
 drivers/gpu/drm/radeon/r300.c   |7 +--
 drivers/gpu/drm/radeon/r420.c   |2 +-
 drivers/gpu/drm/radeon/r520.c   |4 ++--
 drivers/gpu/drm/radeon/radeon_reg.h |2 ++
 drivers/gpu/drm/radeon/rs400.c  |   15 +--
 drivers/gpu/drm/radeon/rv515.c  |   10 +-
 7 files changed, 29 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 5968dde..5f15820 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1031,8 +1031,8 @@ int r100_cp_init(struct radeon_device *rdev, unsigned 
ring_size)
WREG32(RADEON_CP_CSQ_MODE,
   REG_SET(RADEON_INDIRECT2_START, indirect2_start) |
   REG_SET(RADEON_INDIRECT1_START, indirect1_start));
-   WREG32(0x718, 0);
-   WREG32(0x744, 0x4D4D);
+   WREG32(RADEON_CP_RB_WPTR_DELAY, 0);
+   WREG32(RADEON_CP_CSQ_MODE, 0x4D4D);
WREG32(RADEON_CP_CSQ_CNTL, RADEON_CSQ_PRIBM_INDBM);
radeon_ring_start(rdev);
r = radeon_ring_test(rdev);
@@ -2347,10 +2347,10 @@ void r100_vga_set_state(struct radeon_device *rdev, 
bool state)

temp = RREG32(RADEON_CONFIG_CNTL);
if (state == false) {
-   temp &= ~(1<<8);
-   temp |= (1<<9);
+   temp &= ~RADEON_CFG_VGA_RAM_EN;
+   temp |= RADEON_CFG_VGA_IO_DIS;
} else {
-   temp &= ~(1<<9);
+   temp &= ~RADEON_CFG_VGA_IO_DIS;
}
WREG32(RADEON_CONFIG_CNTL, temp);
 }
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index cf862ca..55fe5ba 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -69,6 +69,9 @@ void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
mb();
 }

+#define R300_PTE_WRITEABLE (1 << 2)
+#define R300_PTE_READABLE  (1 << 3)
+
 int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
 {
void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
@@ -78,7 +81,7 @@ int rv370_pcie_gart_set_page(struct radeon_device *rdev, int 
i, uint64_t addr)
}
addr = (lower_32_bits(addr) >> 8) |
   ((upper_32_bits(addr) & 0xff) << 24) |
-  0xc;
+  R300_PTE_WRITEABLE | R300_PTE_READABLE;
/* on x86 we want this to be CPU endian, on powerpc
 * on powerpc without HW swappers, it'll get swapped on way
 * into VRAM - so no need for cpu_to_le32 on VRAM tables */
@@ -135,7 +138,7 @@ int rv370_pcie_gart_enable(struct radeon_device *rdev)
WREG32_PCIE(RADEON_PCIE_TX_DISCARD_RD_ADDR_LO, rdev->mc.vram_start);
WREG32_PCIE(RADEON_PCIE_TX_DISCARD_RD_ADDR_HI, 0);
/* Clear error */
-   WREG32_PCIE(0x18, 0);
+   WREG32_PCIE(RADEON_PCIE_TX_GART_ERROR, 0);
tmp = RREG32_PCIE(RADEON_PCIE_TX_GART_CNTL);
tmp |= RADEON_PCIE_TX_GART_EN;
tmp |= RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD;
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c
index c387346..0b59ed7 100644
--- a/drivers/gpu/drm/radeon/r420.c
+++ b/drivers/gpu/drm/radeon/r420.c
@@ -96,7 +96,7 @@ void r420_pipes_init(struct radeon_device *rdev)
   "programming pipes. Bad things might happen.\n");
}
/* get max number of pipes */
-   gb_pipe_select = RREG32(0x402C);
+   gb_pipe_select = RREG32(R400_GB_PIPE_SELECT);
num_pipes = ((gb_pipe_select >> 12) & 3) + 1;

/* SE chips have 1 pipe */
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c
index 3c8677f..2ce80d9 100644
--- a/drivers/gpu/drm/radeon/r520.c
+++ b/drivers/gpu/drm/radeon/r520.c
@@ -79,8 +79,8 @@ static void r520_gpu_init(struct radeon_device *rdev)
WREG32(0x4128, 0xFF);
}
r420_pipes_init(rdev);
-   gb_pipe_select = RREG32(0x402C);
-   tmp = RREG32(0x170C);
+   gb_pipe_select = RREG32(R400_GB_PIPE_SELECT);
+   tmp = RREG32(R300_DST_PIPE_CONFIG);
pipe_select_current = (tmp >> 2) & 3;
tmp = (1 << pipe_select_current) |
  (((gb_pipe_select >> 8) & 0xF) << 4);
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h 
b/drivers/gpu/drm/radeon/radeon_reg.h
index 3cd4dac..ec93a75 100644
--- a/drivers/gpu/drm/radeon/radeon_reg.h
+++ b/drivers/gpu/drm/radeon/radeon_reg.h
@@ -375,6 +375,8 @@
 #define RADEON_CONFIG_APER_SIZE 0x0108
 #define RADEON_CONFIG_BONDS 0x00e8
 #define RADEON_CONFIG_CNTL  0x00e0
+#   define RADEON_CFG_VGA_RAM_EN(1 << 8)
+#   define RADEON_CFG_VGA_IO_DIS(1 << 9)
 #   define RADEON_CFG_ATI_REV_A11   (0   << 16)
 #   define RADEON_CFG_ATI_REV_A12   (1   << 16)
 #   define RADEON_CFG_ATI_REV_A13   (2   << 16)
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs4

[Bug 29851] [r300g] HyperZ on RS690 not work correctly

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=29851

--- Comment #9 from Marek Ol??k  2011-01-24 20:57:51 PST 
---
Created an attachment (id=42432)
 View: https://bugs.freedesktop.org/attachment.cgi?id=42432
 Review: https://bugs.freedesktop.org/review?bug=29851&attachment=42432

possible fix

Does the attached patch fix anything?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32296] [r300g] Screen corruption with WoW when HyperZ enabled.

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32296

--- Comment #5 from Marek Ol??k  2011-01-24 20:59:04 PST 
---
Does this patch fix anything?

https://bugs.freedesktop.org/attachment.cgi?id=42432

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32945] Lower part of the screen corrupt with HyperZ enabled

2011-01-24 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=32945

--- Comment #3 from Marek Ol??k  2011-01-24 21:00:14 PST 
---
Does this patch fix anything?

https://bugs.freedesktop.org/attachment.cgi?id=42432

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.