1. 16 Dec, 2009 5 commits
    • Zhao Yakui's avatar
      drm/i915: Update LVDS connector status when receiving ACPI LID event · a2565377
      Zhao Yakui authored
      Dirk reports that nothing is displayed on LVDS when using ubuntu 9.1 after
      close/reopen the LID. And I also reproduce this issue on another laptop.
      After some tests and debug, it seems that it is related with that the
      LVDS status is not updated in time in course of suspend/resume.
      
      Now the LID state is used to check whether the LVDS is connected or
      disconnected. And when the LID is closed, it means that the LVDS is
      disconnected. When it is reopened, it means that the LVDS is connected.
      At the same time on some distributions the LID event is also used to put
      the system into suspend state. When the LID is closed, the system will enter
      the suspend state. When the LID is reopened, the system will be resumed.
      
      In such case when the LID is closed, user-space script will receive the LID
      notification event and  detect the LVDS as disconnected. Then the system will
      enter the suspended state. When the LID is reopened, the system will be
      resumed. As the LVDS status is not updated in course of resume, it will cause
      that the LVDS connector is marked as unused and disabled. After the resume is
      finished,user-space script will try to configure the display mode for LVDS.
      But unfortunately as the LVDS status is not updated in time and it is still
      marked as disconnected, the LVDS and its corresponding CRTC will be disabled
      again in the function of drm_helper_disable_unused_functions after changing
      mode for LVDS.
      
      So we had better check and update the status of LVDS connector after receiving
      the LID notication event. Then after the system is resumed from suspended
      state, we can set the display mode for LVDS correctly.
      Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Reported-by: default avatarDirk Hohndel <hohndel@infradead.org>
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      CC: stable@kernel.org
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      a2565377
    • Zhao Yakui's avatar
      drm/i915: Add MALATA PC-81005 to ACPI LID quirk list · a3cb5195
      Zhao Yakui authored
      The MALATA PC-81005 laptop always reports that the LID status is closed and we
      can't use it reliabily for LVDS detection. So add this box into the quirk list.
      
      https://bugs.freedesktop.org/show_bug.cgi?id=25523Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Review-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: default avatarHector <hector1987@gmail.com>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      a3cb5195
    • Zhenyu Wang's avatar
      drm/i915: implement new pm ops for i915 · cbda12d7
      Zhenyu Wang authored
      One problem in i915 hibernate with current legacy pci pm ops is
      that after we do freeze, we'll be forced to do resume once again,
      which re-init some resources and do modesetting again, that is
      unnecessary for hibernate. This patch trys to bypass that.
      
      We can't resolve this within legacy pm framework, but can do it
      easily with new pm ops. Suspend (S3) process has also been kept
      without change.
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      cbda12d7
    • Matthew Garrett's avatar
      drm/i915: Don't check for lid presence when detecting LVDS · 11ba1592
      Matthew Garrett authored
      Checking for the presence of a lid in order to validate whether or not
      an LVDS display exists fails on some development platforms that implement
      a lid device but allow the LVDS to be disabled. The VBT is correctly
      updated, but Linux assumes that an LVDS is still present and lies to
      userspace. Remove the lid check and trust the VBT.
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      11ba1592
    • Daniel Vetter's avatar
      drm/i915: fix order of fence release wrt flushing · 96b47b65
      Daniel Vetter authored
      i915_gem_object_unbind had the ordering wrong. The other user,
      i915_gem_object_put_fence_reg already has the correct ordering.
      
      Results was usually corrupted pixmaps, especially garbled font glyphs
      after a suspend/resume (because this evicts everything).
      
      I'm still waiting for the feedback from the bug-reporters, but
      because this obviously fixes a bug (at least for me) I'm already
      submitting it.
      
      Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=25406Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      CC: stable@kernel.org
      96b47b65
  2. 15 Dec, 2009 35 commits