1. 24 11月, 2011 1 次提交
    • K
      drm/i915: Treat pre-gen4 backlight duty cycle value consistently · ca88479c
      Keith Packard 提交于
      For i945 and earlier chips, the backlight frequency value had the low
      bit (of 16) fixed to zero. The Pineview code path handled this by just
      exposing the backlight range as 15 bits while other chips had the
      backlight range limited to 0 .. 0xfffe.
      
      This patch makes everyone take the pineview code path, providing 15
      bits of backlight duty cycle range which seems more than sufficient to
      me.
      
      Daniel Mack reported that writing 1 to bit 0 of the duty cycle
      register was causing problems on his Samsung X20 notebook, even when
      the duty cycle value was less than the maximum backlight value. (He
      tried a value of 29749 with max_brightness of 29750). This patch never
      writes a '1' to that bit.
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Reported-and-tested-by: NDaniel Mack <zonque@gmail.com>
      Cc: stable@kernel.org
      ca88479c
  2. 18 11月, 2011 1 次提交
  3. 21 10月, 2011 1 次提交
    • T
      drm/i915/panel: Always record the backlight level again (but cleverly) · f52c619a
      Takashi Iwai 提交于
      The commit 47356eb6 introduced a
      mechanism to record the backlight level only at disabling time, but it
      also introduced a regression.  Since intel_lvds_enable() may be called
      without disabling (e.g. intel_lvds_commit() calls it unconditionally),
      the backlight gets back to the last recorded value.  For example, this
      happens when you dim the backlight, close the lid and open the lid,
      then the backlight suddenly goes to the brightest.
      
      This patch fixes the bug by recording the backlight level always
      when changed via intel_panel_set_backlight().  And,
      intel_panel_{enable|disable}_backlight() call the internal function not
      to update the recorded level wrongly.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Reviewed-by: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      f52c619a
  4. 20 9月, 2011 1 次提交
  5. 16 8月, 2011 1 次提交
  6. 26 7月, 2011 1 次提交
    • A
      drm/i915/pch: Fix integer math bugs in panel fitting · 302983e9
      Adam Jackson 提交于
      Consider a 1600x900 panel, upscaling a 1360x768 mode, full-aspect.  The
      old math would give you:
      
          scaled_width  = 1600 * 768;         /* 1228800 */
          scaled_height = 1360 * 900;         /* 1224000 */
          if (scaled_width > scaled_height) { /* pillarbox, and true */
              width  = 1224000 / 768;         /* int(1593.75) = 1593 */
              x      = (1600 - 1593 + 1) / 2; /* 4 */
              y      = 0;
              height = 768;
          } /* ... */
      
      This is broken.  The total width of scanout would then be 1593 + 4 + 4,
      or 1601, which is wider than the panel itself.  The hardware very
      dutifully implements this, and you end up with a black 45° diagonal from
      the top-left corner to the bottom edge of the screen.  It's a cool
      effect and all, but not what you wanted.  Similar things happen for the
      letterbox case.
      
      The problem is that you have an integer number of pixels, which means
      it's usually impossible to upscale equally on both axes.  1360/768 is
      1.7708, 1600/900 is 1.7777.  Since we're constrained on the one axis,
      the other one wants to come out as an even number of pixels (the panel
      is almost certainly even on both axes, and the x/y offsets will be
      applied on both sides).  In the math above, if 'width' comes out even,
      rounding down is correct; if it's odd, you'd rather round up.  So just
      increment width/height in those cases.
      
      Tested on a Lenovo T500 (Ironlake).
      Signed-off-by: NAdam Jackson <ajax@redhat.com>
      Tested-By: NDaniel Manrique <daniel.manrique@canonical.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38851Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      302983e9
  7. 14 3月, 2011 1 次提交
  8. 11 3月, 2011 1 次提交
  9. 22 2月, 2011 2 次提交
    • C
      drm/i915: Add a module parameter to ignore lid status · fca87409
      Chris Wilson 提交于
      Seems like we are forever to be cursed with buggy firmware, so allow the
      user to explicitly set the panel connection status.
      
      Of secondary utility for cases where I run laptops with the lid closed,
      but still want to configure the LVDS.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      fca87409
    • I
      drm/i915: Do not handle backlight combination mode specially · 951f3512
      Indan Zupancic 提交于
      The current code does not follow Intel documentation: It misses some things
      and does other, undocumented things. This causes wrong backlight values in
      certain conditions. Instead of adding tricky code handling badly documented
      and rare corner cases, don't handle combination mode specially at all. This
      way PCI_LBPC is never touched and weird things shouldn't happen.
      
      If combination mode is enabled, then the only downside is that changing the
      brightness has a greater granularity (the LBPC value), but LBPC is at most
      254 and the maximum is in the thousands, so this is no real functional loss.
      
      A potential problem with not handling combined mode is that a brightness of
      max * PCI_LBPC is not bright enough. However, this is very unlikely because
      from the documentation LBPC seems to act as a scaling factor and doesn't look
      like it's supposed to be changed after boot. The value at boot should always
      result in a bright enough screen.
      
      IMPORTANT: However, although usually the above is true, it may not be when
      people ran an older (2.6.37) kernel which messed up the LBPC register, and
      they are unlucky enough to have a BIOS that saves and restores the LBPC value.
      Then a good kernel may seem to not work: Max brightness isn't bright enough.
      If this happens people should boot back into the old kernel, set brightness
      to the maximum, and then reboot. After that everything should be fine.
      
      For more information see the below links. This fixes bugs:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=23472
        http://bugzilla.kernel.org/show_bug.cgi?id=25072Signed-off-by: NIndan Zupancic <indan@nul.nu>
      Tested-by: NAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      951f3512
  10. 16 2月, 2011 1 次提交
  11. 13 1月, 2011 1 次提交
  12. 12 1月, 2011 1 次提交
  13. 23 11月, 2010 1 次提交
  14. 21 9月, 2010 1 次提交
  15. 08 9月, 2010 1 次提交
  16. 10 8月, 2010 1 次提交