1. 13 Jun, 2014 27 commits
  2. 11 Jun, 2014 13 commits
    • Daniel Vetter's avatar
      drm/i915: Add #defines for short/long pulse on gmch platforms · a211b497
      Daniel Vetter authored
      For no reason at all the public docs lack them, and Dave needs them
      for his hpd interrupt rework.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a211b497
    • Robert Beckett's avatar
      drm/i915: Simplify intel_gpu_reset · 542c184f
      Robert Beckett authored
      Replaced ever growing switch for gen version with chained conditionals.
      Futre gen's only need to add a new one if they require something different.
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarRobert Beckett <robert.beckett@intel.com>
      [danvet: Picked from internal tree and white-wash commit message.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      542c184f
    • Matt Roper's avatar
      drm/i915: Drop unused lut tables from intel_plane · d5ec2639
      Matt Roper authored
      Those LUT where defined in the original sprite patch introducing intel_plane,
      but were never used.
      
        commit b840d907
        Author: Jesse Barnes <jbarnes@virtuousgeek.org>
        Date:   Tue Dec 13 13:19:38 2011 -0800
      
          drm/i915: add SNB and IVB video sprite support v6
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Pimp commit message as suggested by Damien]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d5ec2639
    • Daniel Vetter's avatar
      drm/i915: runtime PM support for DPMS · 0e572fe7
      Daniel Vetter authored
      Keeping track of the power domains is a bit messy since crtc->active
      is currently updated by the platform hooks, but we need to be aware of
      which state transition exactly is going on. Maybe we simply need to
      shovel all the power domain handling down into platform code to
      simplify this. But doing that requires some more auditing since
      currently the ->mode_set callbacks still read some random registers
      (to e.g. figure out the reference clocks).
      
      Also note that intel_crtc_update_dpms is always call first/last even
      for encoders which have their own dpms functions. Hence we really only
      need to update this place here.
      
      Being a quick "does it blow up?" run not really tested yet.
      
      v2: Don't do runtime PM in the DPMS hooks for HAS_DDI platforms since
      that is stalled. Also add a comment to explain what's going on.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      0e572fe7
    • Jesse Barnes's avatar
      drm/i915: enable PPGTT on VLV · 7365fb78
      Jesse Barnes authored
      Working for real this time.  i915_ppgtt_info has all sorts of good stuff
      in it and X is running nicely on top.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7365fb78
    • Shashank Sharma's avatar
      drm/i915: Use transcoder as index to MIPI regs · a2560a66
      Shashank Sharma authored
      Conceptually, the MIPI registers are addressed by the MIPI transcoder
      index, not the pipe. It doesn't matter right now, because there's a
      1:1 relationship between pipes and MIPI transcoders, but that change
      allows us to break that link in the future
      
      V1: Created new patch to address Damien's review comment.
      Replacing _PIPE calls to _TRANSCODER calls
      V2: Re-basing on patch 2
      V3: Re-basing on patch 2
      V4: Re-basing on patch 2
      Signed-off-by: default avatarShashank Sharma <shashank.sharma@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a2560a66
    • Shashank Sharma's avatar
      drm/i915: Change Mipi register definitions · 4ad83e94
      Shashank Sharma authored
      Re-define MIPI register definitions in such a way that most of
      the existing DSI code can be re-used for future platforms. Register
      definitions are re-written using MMIO offset variable, so that without
      changing the existing sequence, same code can be generically applied.
      
      V4: Addressing review comments by Damien and Ville, splitting into two patches
      This patch removes all the un-necessary formatting changes from previous patch.
      V5: Removed 80 char limit formatting for existing MIPI regs
      V6: Removed extra space, change one definition
      Signed-off-by: default avatarShashank Sharma <shashank.sharma@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4ad83e94
    • Robin Schroer's avatar
      drivers/gpu/drm/i915/dma: style fixes · 1a5036bf
      Robin Schroer authored
      Fixed several double space pointer notations, and added one newline
      Signed-off-by: default avatarRobin Schroer <sulamiification@gmail.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1a5036bf
    • David Herrmann's avatar
      drm/i915: use shmem helpers if possible · f461d1be
      David Herrmann authored
      Instead of shuffling gfp-masks all the time, use the
      shmem_read_mapping_page() helper. Note that __GFP_IO and __GFP_WAIT are
      set in mapping_gfp_mask() for i915, so the behavior is still the same.
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f461d1be
    • Matt Roper's avatar
      drm/i915: Intel-specific primary plane handling (v8) · 465c120c
      Matt Roper authored
      Intel hardware allows the primary plane to be disabled independently of
      the CRTC.  Provide custom primary plane handling to allow this.
      
      v8:
       - Pin/unpin properly when clipping causes the primary plane to be
         disabled when it has previously been enabled.
       - s/drm_primary_helper_check_update/drm_plane_helper_check_update/
      v7:
       - Clip primary plane to invisible when crtc is disabled since
         intel_crtc->config.pipe_src_{w,h} may be garbage otherwise.
       - Unpin old fb before pinning new one in the "just pin and
         return" case that is used when the crtc is disabled.
       - Don't treat implicit disabling of the primary plane (caused by
         clipping) the same way as explicit disabling (caused by fb=0).
         For implicit disables, we should leave the fb set and pinned,
         whereas for explicit disables we need to unpin the fb before
         primary->fb is cleared.
      v6:
       - Pass rectangles to primary helper check function and get plane
         visibility back.
       - Wait for pending pageflips on primary plane update/disable.
       - Allow primary plane to be updated while the crtc is disabled (changes
         will take effect when the crtc is re-enabled if modeset passes -1
         for the fb id).
       - Drop WARN() if we try to disable the primary plane when it's
         already been disabled.  This will happen if the crtc gets disabled
         after the primary plane has already been disabled independently.
      v5:
       - Use new drm_primary_helper_check_update() helper function to check
         setplane parameter validity.
       - Swap primary plane's pipe for pre-gen4 FBC (caught by Ville Syrjälä)
       - Cleanup primary plane properly on crtc init failure
      v4:
       - Don't add a primary_plane field to intel_crtc; that was left over
         from a much earlier iteration of this patch series, but is no longer
         needed/used now that the DRM core primary plane support has been
         merged.
      v3:
       - Provide gen-specific primary plane format lists (suggested by Daniel
         Vetter).
       - If the primary plane is already enabled, go ahead and just call the
         primary plane helper to do the update (suggested by Daniel Vetter).
       - Don't try to disable the primary plane on destruction; the DRM layer
         should have already taken care of this for us.
      v2:
       - Unpin fb properly on primary plane disable
       - Provide an Intel-specific set of primary plane formats
       - Additional sanity checks on setplane (in line with the checks
         currently being done by the DRM core primary plane helper)
      Reviewed-by: default avatarChon Ming Lee <chon.ming.lee@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      465c120c
    • Matt Roper's avatar
      drm/i915: don't force full modeset if primary plane is disabled (v2) · 3b150f08
      Matt Roper authored
      In a future patch, we'll allow the primary plane to be disabled by
      userspace via the universal plane API.  If a modeset is requested while
      the primary plane is disabled, crtc->primary->fb will be NULL which
      generally triggers a full modeset (except in fastboot situations).  If
      we detect that the crtc is active, but there's no primary plane fb,
      we should still allow a simple plane update rather than a full modeset
      if the mode isn't actually changing (after re-enabling the primary plane
      of course).
      
      v2:
       - Enable plane after set_base to avoid enabling the plane if set_base
         fails, and to make flip+enable atomic (suggested by Ville)
       - Drop BUG to WARN if we somehow enter the 'fb_changed' modeset case
         with the crtc disabled (suggested by Ville)
      Reviewed-by: default avatarChon Ming Lee <chon.ming.lee@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3b150f08
    • Daniel Vetter's avatar
      drm/i915: Drop locking around fbdev-fb in debugfs · 75e2acf2
      Daniel Vetter authored
      All the date we print is invariant for the lifetime of the driver.
      And none of it would be protected by the mode_config.mutex anyway.
      So drop it.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      75e2acf2
    • Daniel Vetter's avatar
      drm/i915: Fix context locking in debugfs · f3d28878
      Daniel Vetter authored
      This goes all the way back to the introduction of this debugfs file,
      even though back then no locking really was required. None of the
      intermediate patches fixed this.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f3d28878