1. 10 9月, 2014 14 次提交
  2. 02 9月, 2014 1 次提交
  3. 01 9月, 2014 3 次提交
  4. 27 8月, 2014 1 次提交
  5. 22 8月, 2014 3 次提交
  6. 20 8月, 2014 1 次提交
    • T
      drm: fix plane rotation when restoring fbdev configuration · 3a5f87c2
      Thomas Wood 提交于
      Make sure plane rotation is reset correctly when restoring the fbdev
      configuration by using drm_mode_plane_set_obj_prop which calls the
      driver's set_property callback.
      
      The rotation reset feature was introduced in commit 9783de20 (drm:
      Resetting rotation property) and the callback issue was originally
      addressed in a previous version of the patch, but the fix was not
      present in the final version.
      
      v2: Fix documentation warning
          Add some more details to the commit message (Daniel Vetter)
      
      Testcase: igt/kms_rotation_crc
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82236
      Cc: Sonika Jindal <sonika.jindal@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NThomas Wood <thomas.wood@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3a5f87c2
  7. 11 8月, 2014 2 次提交
    • D
      drm/irq: Implement a generic vblank_wait function · e8450f51
      Daniel Vetter 提交于
      As usual in both a crtc index and a struct drm_crtc * version.
      
      The function assumes that no one drivers their display below 10Hz, and
      it will complain if the vblank wait takes longer than that.
      
      v2: Also check dev->max_vblank_counter since some drivers register a
      fake get_vblank_counter function.
      
      v3: Use drm_vblank_count instead of calling the low-level
      ->get_vblank_counter callback. That way we'll get the sw-cooked
      counter for platforms without proper vblank support and so can ditch
      the max_vblank_counter check again.
      
      v4: Review from Michel Dänzer:
      - Restore lost notes about v3:
      - Spelling in kerneldoc.
      - Inline wait_event condition.
      - s/vblank_wait/wait_one_vblank/
      
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e8450f51
    • D
      drm: Add a plane->reset hook · 2a0d7cfd
      Daniel Vetter 提交于
      In general having this can't hurt, and the atomic helpers will need
      it to be able to reset the state objects properly. The overall idea
      is to reset in the order pixels flow, so planes -> crtcs ->
      encoders -> connectors.
      
      v2: Squash in fixup from Ville to correctly deference struct drm_plane
      instead of drm_crtc when walking the plane list. Fixes an oops in
      driver init and resume.
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2a0d7cfd
  8. 09 8月, 2014 1 次提交
  9. 08 8月, 2014 8 次提交
    • D
      drm: trylock modest locking for fbdev panics · cb597bb3
      Daniel Vetter 提交于
      In the fbdev code we want to do trylocks only to avoid deadlocks and
      other ugly issues. Thus far we've only grabbed the overall modeset
      lock, but that already failed to exclude a pile of potential
      concurrent operations. With proper atomic support this will be worse.
      
      So add a trylock mode to the modeset locking code which attempts all
      locks only with trylocks, if possible. We need to track this in the
      locking functions themselves and can't restrict this to drivers since
      driver-private w/w mutexes must be treated the same way.
      
      There's still the issue that other driver private locks aren't handled
      here at all, but well can't have everything. With this we will at
      least not regress, even once atomic allows lots of concurrent kms
      activity.
      
      Aside: We should move the acquire context to stack-based allocation in
      the callers to get rid of that awful WARN_ON(kmalloc_failed) control
      flow which just blows up when memory is short. But that's material for
      separate patches.
      
      v2:
      - Fix logic inversion fumble in the fb helper.
      - Add proper kerneldoc.
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cb597bb3
    • D
      drm: Move ->old_fb from crtc to plane · 3d30a59b
      Daniel Vetter 提交于
      Atomic implemenations for legacy ioctls must be able to drop locks.
      Which doesn't cause havoc since we only do that while constructing
      the new state, so no driver or hardware state change has happened.
      
      The only troubling bit is the fb refcounting the core does - if
      someone else has snuck in then it might potentially unref an
      outdated framebuffer. To fix that move the old_fb temporary storage
      into struct drm_plane for all ioctls, so that the atomic helpers can
      update it.
      
      v2: Fix up the error case handling as suggested by Matt Roper and just
      grab locks uncoditionally - there's no point in optimizing the locking
      for when userspace gets it wrong.
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3d30a59b
    • D
      drm: Handle legacy per-crtc locking with full acquire ctx · d059f652
      Daniel Vetter 提交于
      So drivers using the atomic interfaces expect that they can acquire
      additional locks internal to the driver as-needed. Examples would be
      locks to protect shared state like shared display PLLs.
      
      Unfortunately the legacy ioctls assume that all locking is fully done
      by the drm core. Now for those paths which grab all locks we already
      have to keep around an acquire context in dev->mode_config. Helper
      functions that implement legacy interfaces in terms of atomic support
      can therefore grab this acquire contexts and reuse it.
      
      The only interfaces left are the cursor and pageflip ioctls. So add
      functions to grab the crtc lock these need using an acquire context
      and preserve it for atomic drivers to reuse.
      
      v2:
      - Fixup comments&kerneldoc.
      - Drop the WARNING from modeset_lock_all_crtcs since that can be used
        in legacy paths with crtc locking.
      
      v3: Fix a type on the kerneldoc Dave spotted.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Reviewed-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d059f652
    • D
      drm: Move modeset_lock_all helpers to drm_modeset_lock.[hc] · a6a8bb84
      Daniel Vetter 提交于
      Somehow we've forgotten about this little bit of OCD.
      Reviewed-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a6a8bb84
    • D
      drm: Add drm_plane/connector_index · 10f637bf
      Daniel Vetter 提交于
      In the atomic state we'll have an array of states for crtcs, planes
      and connectors and need to be able to at them by their index. We
      already have a drm_crtc_index function so add the missing ones for
      planes and connectors.
      
      If it later on turns out that the list walking is too expensive we can
      add the index to the relevant modeset objects.
      
      Rob Clark doesn't like the loops too much, but we can always add an
      obj->idx parameter later on. And for now reiterating is actually safer
      since nowadays we have hotpluggable connectors (thanks to DP MST).
      
      v2: Fix embarrassing copypasta fail in kerneldoc and header
      declarations, spotted by Matt Roper.
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      10f637bf
    • S
    • V
      drm: Add drm_crtc_vblank_waitqueue() · 020178a1
      Ville Syrjälä 提交于
      Add a small static inline helper to grab the vblank wait queue based on
      the drm_crtc.
      
      This is useful for drivers to do internal vblank waits using
      wait_event() & co.
      
      v2: Pimp commit message (Daniel)
          Add kernel doc (Daniel)
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      020178a1
    • D
      Revert "drm: drop redundant drm_file->is_master" · 7963e9db
      Dave Airlie 提交于
      This reverts commit 48ba8137.
      
      Thanks to Chris:
      "drm_file->is_master is not synomous with having drm_file->master ==
      drm_file->minor->master. This is because drm_file->master is the same
      for all drm_files of the same generation and so when there is a master,
      every drm_file believes itself to be the master. Confusion ensues and
      things go pear shaped when one file is closed and there is no master
      anymore."
      
      Conflicts:
      	drivers/gpu/drm/drm_drv.c
      	drivers/gpu/drm/drm_stub.c
      7963e9db
  10. 06 8月, 2014 5 次提交
    • T
      drm/dsi: Replace upcasting macro by function · 77df01dc
      Thierry Reding 提交于
      Using a function instead of a macro provides proper type checking.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      77df01dc
    • A
      drm/panel: Provide convenience wrapper for .get_modes() · 7bf93c73
      Ajay Kumar 提交于
      Add a convenience wrapper for the struct drm_panel_funcs' .get_modes()
      function so that not every driver needs to check that the panel driver
      implements the function before calling it.
      Signed-off-by: NAjay Kumar <ajaykumar.rs@samsung.com>
      [treding: extract from larger patch, commit message]
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      7bf93c73
    • A
      drm/panel: add .prepare() and .unprepare() functions · 45527d43
      Ajay Kumar 提交于
      Panels often require an initialization sequence that consists of three
      steps: a) powering up the panel, b) starting transmission of video data
      and c) enabling the panel (e.g. turn on backlight). This is usually
      necessary to avoid visual glitches at the beginning of video data
      transmission.
      
      Similarly, the shutdown sequence is typically done in three steps as
      well: a) disable the panel (e.g. turn off backlight), b) cease video
      data transmission and c) power down the panel.
      
      Currently drivers can only implement .enable() and .disable() functions,
      which is not enough to implement the above sequences. This commit adds a
      second pair of functions, .prepare() and .unprepare() to allow more
      fine-grained control over when the above steps are performed.
      Signed-off-by: NAjay Kumar <ajaykumar.rs@samsung.com>
      [treding: rewrite changelog, add kerneldoc]
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      45527d43
    • C
      drm: Perform cmdline mode parsing during connector initialisation · eaf99c74
      Chris Wilson 提交于
      i915.ko has a custom fbdev initialisation routine that aims to preserve
      the current mode set by the BIOS, unless overruled by the user. The
      user's wishes are determined by what, if any, mode is specified on the
      command line (via the video= parameter). However, that command line mode
      is first parsed by drm_fb_helper_initial_config() which is called after
      i915.ko's custom initial_config() as a fallback method. So in order for
      us to honour it, we need to move the cmdline parser earlier. If we
      perform the connector cmdline parsing as soon as we initialise the
      connector, that cmdline mode and forced status is then available even if
      the fbdev helper is not compiled in or never called.
      
      We also then expose the cmdline user mode in the connector mode lists.
      
      v2: Rebase after connector->name upheaval.
      
      v3: Adapt mga200 to look for the cmdline mode in the new place. Nicely
      simplifies things while at that.
      
      v4: Fix checkpatch.
      
      v5: Select FB_CMDLINE to adapt to the changed fbdev patch.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73154
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v2)
      Cc: dri-devel@lists.freedesktop.org
      Cc: Julia Lemire <jlemire@matrox.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      eaf99c74
    • D
      drm: mark drm_context support as legacy · e7b96070
      David Herrmann 提交于
      This renames all drm-context helpers to drm_legacy_*() and moves the
      internal definitions into the new drm_legacy.h header. This header is
      local to DRM-core and drivers shouldn't access it.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      e7b96070
  11. 05 8月, 2014 1 次提交