Commit Graph

18 Commits

Author SHA1 Message Date
Chris Wilson 273d34fbc4 display: Query current level after finding max value.
The current backlight value is clamped to the valid range [0, max] and
so as we queried the value before setting the max, we forced the current
backlight to 0 and so set it to be zero on initialising the display.

Fixes:

  Bug 30063 - start X will modify brightness value to zero
  https://bugs.freedesktop.org/show_bug.cgi?id=30063

which is a regression due to 38f940dfea.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-07 13:00:23 +01:00
Chris Wilson 00f6af2c8e display: Set MONITOR_EDID_COMPLETE_RAWDATA for large EDIDs
Quoting Adam Jackson:

"But the X driver looks like
it never sets MONITOR_EDID_COMPLETE_RAWDATA, which means the X core
doesn't know that any sections beyond the first are present, so it won't
ever hand back more than 128 bytes to clients.  Boo."

This patch is based on his.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-04 18:51:32 +01:00
Chris Wilson b7a8087fbc Revert "Leave adjustment of backlight to the driver."
This reverts commit 9c3e34703d.

This commit is not ready, as first the driver needs to handle all
controllers, especially those that ignore the BLC and require their own
interface.  Fortunately, by moving that discovery into the kernel - where
it just means finding which ACPI device is attached to the video and has a
backlight interface - the userspace code should become much more sane,
and work even with multi-gpu, multi-lid systems.

But that is for tomorrow.
2010-08-26 00:59:33 +01:00
Chris Wilson 9c3e34703d Leave adjustment of backlight to the driver. 2010-08-25 15:01:41 +01:00
Chris Wilson 271dda84be display: Use the native intel backlight controller
If the i915 driver exposes a native ACPI interface to modify the panel
backlight use it in preference to the generic interfaces. On multi-GPU
systems, the panel backlight is meant to be connected via the IGP and
this ensures that we always find the right interface.

Fixes:

      Bug 29273 - XORG Intel driver chooses wrong acpi_video to control
                  brightness in multi-GPU system
      https://bugs.freedesktop.org/show_bug.cgi?id=29273

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22 19:57:24 +01:00
Chris Wilson c882f6a22a Move registration of vsync fd from pre-init to screen-init
Marty Jack reported an issue he found where the page-flipping handler
was being lost on server reset. This results in the swap completion
notification being lost, with the sporadic hang of full screen
applications like Compiz, flash and even glxgears!

Fixes:

  Bug 29584 - Server in compute loop
  https://bugs.freedesktop.org/show_bug.cgi?id=29584

There are also several possibly related bugs with similar symptoms, i.e.
OpenGL applications hanging on missed swap notifications.

Reported-by: Marty Jack <martyj19@comcast.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Keith Packard <keithp@keithp.com>
2010-08-18 10:21:22 +01:00
Chris Wilson 19c48d3b3f display: outputs are enabled automatically by KMS
When an output is attached to a crtc and that crtc is enabled, the
output is automatically enabled so we can remove the redundant manual
dpms on.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-09 10:13:58 +01:00
Chris Wilson 6304cb048c display: Minor cleanup for adding extra LVDS modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05 18:17:18 +01:00
Chris Wilson 41ae956435 display: Refactor EDID attachment to output.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05 18:16:35 +01:00
Chris Wilson a8919ab296 Revert "display: Cache whether we have probed for an EDID"
Dave Airlie advised that hotplug detection can be unreliable and that
mode caching, in general, should be done in the kernel in any case.

This reverts commit 622e600069.
2010-08-05 10:00:56 +01:00
Chris Wilson 622e600069 display: Cache whether we have probed for an EDID
Remember for the detection cycle whether we have already probed for the
EDID -- as this can be slow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 10:05:09 +01:00
Chris Wilson a6a707ca13 display: Embed the lvds size into the connector
Remove one very common allocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 10:05:09 +01:00
Chris Wilson 6c7d105cca display: Handle cursor error paths.
Check that the cursor was allocated before freeing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 09:51:34 +01:00
Chris Wilson 38f940dfea display: Tidy backlight initialisation
Mostly whitespace and a single error-code fix.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 09:50:14 +01:00
Chris Wilson 2b7263b771 display: Check for buffer overrun in output name lookup.
The kernel may know about more types than we do, so protect ourselves
from reading from beyond the end of the string array.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 09:46:01 +01:00
Dave Airlie 5662916691 intel: add output names for later additions to kernel 2010-08-04 15:35:41 +10:00
Chris Wilson 4f8b279f32 intel_display: Miscellaneous tidy
A mixture of whitespace and closing of leaks on error paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01 12:35:57 +01:00
Chris Wilson db7cd7b9f0 Rename drmmode_display to intel_display
And fixup all the drmmode_* functions to have an intel prefix and
categorise those into intel_mode, intel_crtc, intel_output and
intel_property so that the functions are a little more self-descriptive
and, more importantly, are consistent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01 11:27:29 +01:00