1. 20 2月, 2009 1 次提交
  2. 22 1月, 2009 1 次提交
    • J
      drm: create mode_config idr lock · ad2563c2
      Jesse Barnes 提交于
      Create a separate mode_config IDR lock for simplicity.  The core DRM
      config structures (connector, mode, etc. lists) are still protected by
      the mode_config mutex, but the CRTC IDR (used for the various identifier
      IDs) is now protected by the mode_config idr_mutex.  Simplifies the
      locking a bit and removes a warning.
      
      All objects are protected by the config mutex, we may in the future,
      split the object further to have reference counts.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ad2563c2
  3. 16 1月, 2009 1 次提交
    • J
      drm: initial KMS config fixes · 40a518d9
      Jesse Barnes 提交于
      When mode setting is first initialized, the driver will call into
      drm_helper_initial_config() to set up an initial output and framebuffer
      configuration.  This routine is responsible for probing the available
      connectors, encoders, and crtcs, looking for modes and putting together
      something reasonable (where reasonable is defined as "allows kernel
      messages to be visible on as many displays as possible").
      
      However, the code was a bit too aggressive in setting default modes when
      none were found on a given connector.  Even if some connectors had modes,
      any connectors found lacking modes would have the default 800x600 mode added
      to their mode list, which in some cases could cause problems later down the
      line.  In my case, the LVDS was perfectly available, but the initial config
      code added 800x600 modes to both of the detected but unavailable HDMI
      connectors (which are on my non-existent docking station).  This ended up
      preventing later code from setting a mode on my LVDS, which is bad.
      
      This patch fixes that behavior by making the initial config code walk
      through the connectors first, counting the available modes, before it decides
      to add any default modes to a possibly connected output.  It also fixes the
      logic in drm_target_preferred() that was causing zeroed out modes to be set
      as the preferred mode for a given connector, even if no modes were available.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      40a518d9
  4. 29 12月, 2008 3 次提交
    • K
      drm: drop DRM_IOCTL_MODE_REPLACEFB, add+remove works just as well. · 0c7c2664
      Kristian H�gsberg 提交于
      The replace fb ioctl replaces the backing buffer object for a modesetting
      framebuffer object.  This can be acheived by just creating a new
      framebuffer backed by the new buffer object, setting that for the crtcs
      in question and then removing the old framebuffer object.
      Signed-off-by: NKristian Hogsberg <krh@redhat.com>
      Acked-by: NJakob Bornecrantz <jakob@vmware.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0c7c2664
    • J
      drm: sanitise drm modesetting API + remove unused hotplug · e0c8463a
      Jakob Bornecrantz 提交于
      The initially merged modesetting API has some uglies in it, this
      cleans up the struct members and ioctl ordering for initial submission.
      
      It also removes the unneeded hotplug infrastructure.
      
      airlied:- I've pulled this patch in from git modesetting-gem tree.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e0c8463a
    • D
      DRM: add mode setting support · f453ba04
      Dave Airlie 提交于
      Add mode setting support to the DRM layer.
      
      This is a fairly big chunk of work that allows DRM drivers to provide
      full output control and configuration capabilities to userspace.  It was
      motivated by several factors:
        - the fb layer's APIs aren't suited for anything but simple
          configurations
        - coordination between the fb layer, DRM layer, and various userspace
          drivers is poor to non-existent (radeonfb excepted)
        - user level mode setting drivers makes displaying panic & oops
          messages more difficult
        - suspend/resume of graphics state is possible in many more
          configurations with kernel level support
      
      This commit just adds the core DRM part of the mode setting APIs.
      Driver specific commits using these new structure and APIs will follow.
      
      Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com>
      Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f453ba04