1. 01 12月, 2012 1 次提交
    • R
      drm: remove legacy drm_connector_property fxns · 58495563
      Rob Clark 提交于
      Replace references to and remove the connector property fxns, which
      have been superseded with the more general object property fxns:
      
        + drm_connector_attach_property -> drm_object_attach_property
        + drm_connector_property_set_value -> drm_object_property_set_value
        + drm_connector_property_get_value -> drm_object_property_get_value
      Signed-off-by: NRob Clark <rob@ti.com>
      58495563
  2. 29 11月, 2012 1 次提交
  3. 20 11月, 2012 4 次提交
    • D
      drm: don't start the poll engine in probe_single_connector · 905bc9ff
      Daniel Vetter 提交于
      Actually there's a reason this stuff is there, and it's called
      
      commit e58f637b
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Aug 20 09:13:36 2010 +0100
      
          drm/kms: Add a module parameter to disable polling
      
      The idea has been that users can enable/disable polling at runtime. So
      the quick hack has been to just re-enable the output polling if xrandr
      asks for the latest state of the connectors.
      
      The problem with that hack is that when we force connectors to another
      state than what would be detected, we nicely ping-pong:
      - Userspace calls probe, gets the forced state, but polling starts
        again.
      - Polling notices that the state is actually different, wakes up
        userspace.
      - Repeat.
      
      As that commit already explains, the right fix would be to make the
      locking more fine-grained, so that hotplug detection on one output
      does not interfere with cursor updates on another crtc.
      
      But that is way too much work. So let's just safe this gross hack by
      caching the last-seen state of drm_kms_helper_poll for that driver,
      and only fire up the poll engine again if it changed from off to on.
      
      v2: Fixup the edge detection of drm_kms_helper_poll.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49907Tested-by: NTvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      905bc9ff
    • D
      drm: run the hpd irq event code directly · 69787f7d
      Daniel Vetter 提交于
      All drivers already have a work item to run the hpd code, so we don't
      need to launch a new one in the helper code. Dave Airlie mentioned
      that the cancel+re-queue might paper over DP related hpd ping-pongs,
      hence why this is split out.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      69787f7d
    • D
      drm: handle HPD and polled connectors separately · 816da85a
      Daniel Vetter 提交于
      Instead of reusing the polling code for hpd handling, split them up.
      This has a few consequences:
      - Don't touch HPD capable connectors in the poll loop.
      - Only touch HPD capable connectors in drm_helper_hpd_irq_event.
      - We could run the HPD handling directly (because all callers already
        use their own work item), but for easier bisect that happens in it's
        own patch.
      
      The ultimate goal is that drivers grow some smarts about which
      connectors have received a hotplug event and only call the detect code
      of that connector. But that's a second step.
      
      v2: s/hdp/hpd/, noticed by Adam Jackson. I can't type.
      
      v3: Split out the work item removal as requested by Dave Airlie. This
      results in a temporary mode_config.hpd_irq_work item to keep things
      the same.
      
      v4: In the hpd_irq_event handler don't bail out if other bits than HPD
      are set. This is useful where e.g. hpd is unreliably, but mostly
      works. Drivers can then set both HPD and POLL flags, and users get the
      best of both worlds: Quick hotplug feedback if the hpd works, but
      still reliable detection with the polling. The poll loop already works
      the same, and doesn't bail if HPD is set.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      816da85a
    • S
      drm: get cea video id code for a given display mode · a4799037
      Stephane Marchesin 提交于
      This patch adds support for getting CEA Video ID Code for a given
      display mode after matching with edid_cea_modes list. Its index in
      the list added with one, gives the desired code.
      
      This exported function will be used by hdmi drivers for composing
      AVI info frame data.
      Signed-off-by: NStephane Marchesin <marcheu@chromium.org>
      Signed-off-by: NRahul Sharma <rahul.sharma@samsung.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a4799037
  4. 07 11月, 2012 1 次提交
  5. 03 10月, 2012 2 次提交
  6. 02 10月, 2012 2 次提交
    • R
      drm: support for rotated scanout · 7c80e128
      Rob Clark 提交于
      For drivers that can support rotated scanout, the extra parameter
      checking in drm-core, while nice, tends to get confused.  To solve
      this drivers can set the crtc or plane invert_dimensions field so
      that the dimension checking takes into account the rotation that
      the driver is performing.
      
      v1: original
      v2: remove invert_dimensions from plane, at Ville's suggestion.
          Userspace can give rotated src coordinates, so invert_dimensions
          is not required for planes.
      Signed-off-by: NRob Clark <rob@ti.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      7c80e128
    • R
      drm: refcnt drm_framebuffer (v4.1) · f7eff60e
      Rob Clark 提交于
      This simplifies drm fb lifetime, and if the crtc/plane needs to hold
      a ref to the fb when disabling a pipe until the next vblank, this
      avoids the need to make disabling an overlay synchronous.  This is a
      problem that shows up when userspace is using a drm plane to
      implement a hw cursor.. making overlay disable synchronous causes
      a performance problem when x11 is rapidly enabling/disabling the
      hw cursor.  But not making it synchronous opens up a race condition
      for crashing if userspace turns around and immediately deletes the
      fb.  Refcnt'ing the fb makes it possible to solve this problem.
      
      v1: original
      v2: add drm_framebuffer_remove() which is called in all paths where
          fb->funcs->destroy() was directly called before.  This cleans
          up the CRTCs/planes that the fb was attached to.  You should
          only directly use drm_framebuffer_unreference() if you are also
          using drm_framebuffer_reference() to keep a ref to the fb.
      v3: add comment explaining the fb refcount
      v4: remove duplicate 'list_del(&fb->filp_head)'
      
      [airlied: v4.1: fix local rejection]
      Signed-off-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f7eff60e
  7. 26 9月, 2012 1 次提交
  8. 17 9月, 2012 1 次提交
  9. 24 8月, 2012 2 次提交
  10. 22 8月, 2012 1 次提交
  11. 20 7月, 2012 1 次提交
  12. 12 6月, 2012 1 次提交
    • P
      drm: increase DRM_OBJECT_MAX_PROPERTY to 24 · fe456168
      Paulo Zanoni 提交于
      Before Kernel 3.5, no one was checking for the return value of
      drm_connector_attach_property, so we never noticed that we were unable
      to create some properties. Commit "drm: WARN() when
      drm_connector_attach_property fails" added a WARN when we fail to
      create a property, and the transition from "connector properties" to
      "object properties" changed the warning message a little bit.
      
      On i915 machines with many TV connectors we hit the maximum number of
      properties (since each TV connector uses a lot of properties), so we
      get a few backtraces in our logs. This commit increases the maximum
      number of properties to 24 hoping we'll have enough room for
      everybody.
      
      Chris suggested that we convert this code to "lists", but I believe
      this conversion can come after we make sure people's dmesgs are not
      spammed by our driver.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reported-by: NDave Jones <davej@redhat.com>
      Tested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fe456168
  13. 22 5月, 2012 4 次提交
  14. 17 5月, 2012 5 次提交
  15. 27 4月, 2012 1 次提交
  16. 20 4月, 2012 4 次提交
  17. 20 3月, 2012 1 次提交
    • C
      drm: allow loading an EDID as firmware to override broken monitor · da0df92b
      Carsten Emde 提交于
      Broken monitors and/or broken graphic boards may send erroneous or no
      EDID data. This also applies to broken KVM devices that are unable to
      correctly forward the EDID data of the connected monitor but invent
      their own fantasy data.
      
      This patch allows to specify an EDID data set to be used instead of
      probing the monitor for it. It contains built-in data sets of frequently
      used screen resolutions. In addition, a particular EDID data set may be
      provided in the /lib/firmware directory and loaded via the firmware
      interface. The name is passed to the kernel as module parameter of the
      drm_kms_helper module either when loaded
        options drm_kms_helper edid_firmware=edid/1280x1024.bin
      or as kernel commandline parameter
        drm_kms_helper.edid_firmware=edid/1280x1024.bin
      
      It is also possible to restrict the usage of a specified EDID data set
      to a particular connector. This is done by prepending the name of the
      connector to the name of the EDID data set using the syntax
        edid_firmware=[<connector>:]<edid>
      such as, for example,
        edid_firmware=DVI-I-1:edid/1920x1080.bin
      in which case no other connector will be affected.
      
      The built-in data sets are
      Resolution    Name
      --------------------------------
      1024x768      edid/1024x768.bin
      1280x1024     edid/1280x1024.bin
      1680x1050     edid/1680x1050.bin
      1920x1080     edid/1920x1080.bin
      
      They are ignored, if a file with the same name is available in the
      /lib/firmware directory.
      
      The built-in EDID data sets are based on standard timings that may not
      apply to a particular monitor and even crash it. Ideally, EDID data of
      the connected monitor should be used. They may be obtained through the
      drm/cardX/cardX-<connector>/edid entry in the /sys/devices PCI directory
      of a correctly working graphics adapter.
      
      It is even possible to specify the name of an EDID data set on-the-fly
      via the /sys/module interface, e.g.
      echo edid/myedid.bin >/sys/module/drm_kms_helper/parameters/edid_firmware
      The new screen mode is considered when the related kernel function is
      called for the first time after the change. Such calls are made when the
      X server is started or when the display settings dialog is opened in an
      already running X server.
      Signed-off-by: NCarsten Emde <C.Emde@osadl.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      da0df92b
  18. 15 3月, 2012 6 次提交
  19. 17 2月, 2012 1 次提交
    • D
      drm: add some caps for userspace to discover more info for dumb KMS driver (v2) · 019d96cb
      Dave Airlie 提交于
      For the simple KMS driver case we need some more info about what the preferred
      depth and if a shadow framebuffer is preferred.
      
      I've only added this for intel/radeon which support the dumb ioctls so far.
      
      If you need something really fancy you should be writing a real X.org driver.
      
      v2: drop cursor information, just return an error from the cursor ioctls
      and we can make userspace fallback to sw cursor in that case, cursor
      info was getting too messy, best to start smaller.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      019d96cb