All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] uxa: When the output is off, report the cached backlight value
@ 2014-06-18 13:01 Hans de Goede
  2014-06-18 13:01 ` [PATCH 2/2] uxa: Mark the output as off before making pipe changes Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2014-06-18 13:01 UTC (permalink / raw)
  To: intel-gfx

This is a "backport" of commit b545e10c50cb to uxa, so that users who are
still using uxa, don't end up with a black screen after suspend / resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 src/uxa/intel_display.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index b90061b..e00b9c2 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -1257,9 +1257,13 @@ intel_output_get_property(xf86OutputPtr output, Atom property)
 		if (!intel_output->backlight.iface)
 			return FALSE;
 
-		val = intel_output_backlight_get(output);
-		if (val < 0)
-			return FALSE;
+		if (intel_output->dpms_mode == DPMSModeOn) {
+			val = intel_output_backlight_get(output);
+			if (val < 0)
+				return FALSE;
+		} else {
+			val = intel_output->backlight_active_level;
+		}
 
 		err = RRChangeOutputProperty(output->randr_output, property,
 					     XA_INTEGER, 32, PropModeReplace, 1, &val,
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] uxa: Mark the output as off before making pipe changes
  2014-06-18 13:01 [PATCH 1/2] uxa: When the output is off, report the cached backlight value Hans de Goede
@ 2014-06-18 13:01 ` Hans de Goede
  2014-06-18 13:14   ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2014-06-18 13:01 UTC (permalink / raw)
  To: intel-gfx

This is a partial "backport" of commit c6cd10f536, which makes the same
change for sna, to avoid users still using uxa ending up with a blackscreen
after plugging in an external monitor.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 src/uxa/intel_display.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index e00b9c2..a745dc5 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -320,6 +320,14 @@ intel_crtc_apply(xf86CrtcPtr crtc)
 		xf86OutputPtr output = xf86_config->output[i];
 		struct intel_output *intel_output;
 
+		/* Make sure we mark the output as off (and save the backlight)
+		 * before the kernel turns it off due to changing the pipe.
+		 * This is necessary as the kernel may turn off the backlight
+		 * and we lose track of the user settings.
+		 */
+		if (output->crtc == NULL)
+			output->funcs->dpms(output, DPMSModeOff);
+
 		if (output->crtc != crtc)
 			continue;
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] uxa: Mark the output as off before making pipe changes
  2014-06-18 13:01 ` [PATCH 2/2] uxa: Mark the output as off before making pipe changes Hans de Goede
@ 2014-06-18 13:14   ` Chris Wilson
  2014-06-18 13:50     ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2014-06-18 13:14 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

On Wed, Jun 18, 2014 at 03:01:37PM +0200, Hans de Goede wrote:
> This is a partial "backport" of commit c6cd10f536, which makes the same
> change for sna, to avoid users still using uxa ending up with a blackscreen
> after plugging in an external monitor.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Do you want to reference your bugzilla here for background on the bug?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] uxa: Mark the output as off before making pipe changes
  2014-06-18 13:14   ` Chris Wilson
@ 2014-06-18 13:50     ` Hans de Goede
  2014-06-18 14:02       ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2014-06-18 13:50 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Hi,

On 06/18/2014 03:14 PM, Chris Wilson wrote:
> On Wed, Jun 18, 2014 at 03:01:37PM +0200, Hans de Goede wrote:
>> This is a partial "backport" of commit c6cd10f536, which makes the same
>> change for sna, to avoid users still using uxa ending up with a blackscreen
>> after plugging in an external monitor.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Do you want to reference your bugzilla here for background on the bug?

I wasn't sure, which is why I omitted it, but yes that probably makes sense,
please add these links to the commit msg:

https://bugzilla.redhat.com/show_bug.cgi?id=1032978
https://bugzilla.redhat.com/show_bug.cgi?id=1103806

Thanks,

Hans

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] uxa: Mark the output as off before making pipe changes
  2014-06-18 13:50     ` Hans de Goede
@ 2014-06-18 14:02       ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2014-06-18 14:02 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

On Wed, Jun 18, 2014 at 03:50:45PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 06/18/2014 03:14 PM, Chris Wilson wrote:
> > On Wed, Jun 18, 2014 at 03:01:37PM +0200, Hans de Goede wrote:
> >> This is a partial "backport" of commit c6cd10f536, which makes the same
> >> change for sna, to avoid users still using uxa ending up with a blackscreen
> >> after plugging in an external monitor.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > 
> > Do you want to reference your bugzilla here for background on the bug?
> 
> I wasn't sure, which is why I omitted it, but yes that probably makes sense,
> please add these links to the commit msg:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1032978
> https://bugzilla.redhat.com/show_bug.cgi?id=1103806

Added, and pushed. Thanks a lot for tracking down the cause of this one,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-18 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 13:01 [PATCH 1/2] uxa: When the output is off, report the cached backlight value Hans de Goede
2014-06-18 13:01 ` [PATCH 2/2] uxa: Mark the output as off before making pipe changes Hans de Goede
2014-06-18 13:14   ` Chris Wilson
2014-06-18 13:50     ` Hans de Goede
2014-06-18 14:02       ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.