1. 01 3月, 2016 1 次提交
  2. 18 2月, 2016 1 次提交
  3. 11 2月, 2016 1 次提交
  4. 03 2月, 2016 1 次提交
  5. 11 12月, 2015 1 次提交
  6. 23 9月, 2015 1 次提交
  7. 08 9月, 2015 1 次提交
  8. 26 8月, 2015 1 次提交
  9. 14 8月, 2015 1 次提交
  10. 13 4月, 2015 2 次提交
  11. 26 3月, 2015 2 次提交
  12. 27 1月, 2015 4 次提交
    • M
      drm/i915: Add atomic_get_property entrypoint for connectors (v2) · 2545e4a6
      Matt Roper 提交于
      Even though we only support atomic plane updates at the moment, we still
      need to add an .atomic_get_property() entrypoint for connectors before
      we allow the driver to flip on the DRIVER_ATOMIC bit.  As soon as that
      bit gets set, the DRM core will start adding atomic connector properties
      (in addition to the plane properties we care about at the moment), so we
      need to be able to handle the new way the DRM core will interact with
      us.
      
      For simplicity, we just lookup driver-specific connector properties in
      the usual shadow array maintained by the core.  Once we get real atomic
      modeset support for crtc's and planes, this code should be re-written to
      pull the data out of crtc/connector state structures.
      
      v2: Fix intel_dvo and intel_dsi that I missed on the first pass (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2545e4a6
    • M
      drm/i915: Setup dummy atomic state for connectors (v3) · c6f95f27
      Matt Roper 提交于
      We want to enable/test plane updates via the atomic interface, but as
      soon as we flip DRIVER_ATOMIC on, the DRM core will take some atomic
      codepaths to lookup properties during drmModeGetConnector() and some of
      those codepaths unconditionally dereference connector->state
      (specifically when looking up the CRTC ID property in
      drm_atomic_connector_get_property()).  Create a dummy connector state
      for each connector at init time to ensure the DRM core doesn't try to
      dereference a NULL connector->state.  The actual connector properties
      will never be updated or contain useful information, but since we're
      doing this specifically for testing/debug of the plane operations (and
      only when a specific kernel module option is given), that shouldn't
      really matter.
      
      Once we start creating connector states, the DRM core will want to be
      able to clean them up for us.  We also need to hook up the destruction
      entrypoint to the core's helper.
      
      v2: Squash in the patch to set the state destruction hook (Ander & Bob)
      
      v3: Only create dummy connector states when we're actually faking
          atomic support.  (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c6f95f27
    • A
      drm/i915: Embedded struct drm_crtc_state in intel_crtc_state · 2d112de7
      Ander Conselvan de Oliveira 提交于
      And get rid of the duplicate mode structures. This patch was generated
      with the following semantic patch:
      
      @@ @@
      struct intel_crtc_state {
      +struct drm_crtc_state base;
      +
      ...
      -struct drm_display_mode requested_mode;
      -struct drm_display_mode adjusted_mode;
      ...
      }
      @@ struct intel_crtc_state *state; @@
      -state->adjusted_mode
      +state->base.adjusted_mode
      @@ struct intel_crtc_state *state; @@
      -state->requested_mode
      +state->base.mode
      @@ struct intel_crtc_state state; @@
      -state.adjusted_mode
      +state.base.adjusted_mode
      @@ struct intel_crtc_state state; @@
      -state.requested_mode
      +state.base.mode
      @@ struct drm_crtc *crtc; @@
      -to_intel_crtc(crtc)->config.adjusted_mode
      +to_intel_crtc(crtc)->config.base.adjusted_mode
      @@ identifier member; expression E; @@
      -PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
      +PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_I(adjusted_mode.member);
      +PIPE_CONF_CHECK_I(base.adjusted_mode.member);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
      +PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2d112de7
    • A
      drm/i915: Rename struct intel_crtc_config to intel_crtc_state · 5cec258b
      Ander Conselvan de Oliveira 提交于
      The objective is to make this structure usable with the atomic helpers,
      so let's start with the rename. Patch generated with coccinelle:
      
      @@ @@
      -struct intel_crtc_config {
      +struct intel_crtc_state {
      ...
      }
      @@ @@
      -struct intel_crtc_config
      +struct intel_crtc_state
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5cec258b
  13. 19 9月, 2014 1 次提交
  14. 08 9月, 2014 1 次提交
    • V
      drm/i915: Wait for vblank before enabling the TV encoder · 7a98948f
      Ville Syrjälä 提交于
      The vblank waits in intel_tv_detect_type() are timing out for some
      reason. This is a regression caused removing seemingly useless vblank
      waits from the modeset seqeuence in:
      
       commit 56ef52ca
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Thu May 8 19:23:15 2014 +0300
      
          drm/i915: Kill vblank waits after pipe enable on gmch platforms
      
      So it turns out they weren't all entirely useless. Apparently the pipe
      has to go through one full frame before we enable the TV port. Add a
      vblank wait to intel_enable_tv() to make sure that happens.
      
      Another approach was attempted by placing the vblank wait just after
      enabling the port. The theory behind that attempt was that we need to
      let the port stay enabled for one full frame before disabling it again
      during load detection. But that didn't work, and we definitely must
      have the vblank wait before enabling the port.
      
      Cc: stable@vger.kernel.org
      Cc: Alan Bartlett <ajb@elrepo.org>
      Tested-by: NAlan Bartlett <ajb@elrepo.org>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79311Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      7a98948f
  15. 02 9月, 2014 1 次提交
  16. 18 8月, 2014 1 次提交
    • V
      drm/i915: Fix locking for intel_enable_pipe_a() · 208bf9fd
      Ville Syrjälä 提交于
      intel_enable_pipe_a() gets called with all the modeset locks already
      held (by drm_modeset_lock_all()), so trying to grab the same
      locks using another drm_modeset_acquire_ctx is going to fail miserably.
      
      Move most of the drm_modeset_acquire_ctx handling (init/drop/fini)
      out from intel_{get,release}_load_detect_pipe() into the callers
      (intel_{crt,tv}_detect()). Only the actual locking and backoff
      handling is left in intel_get_load_detect_pipe(). And in
      intel_enable_pipe_a() we just share the mode_config.acquire_ctx from
      drm_modeset_lock_all() which is already holding all the relevant locks.
      
      It's perfectly legal to lock the same ww_mutex multiple times using the
      same ww_acquire_ctx. drm_modeset_lock() will convert the returned
      -EALREADY into 0, so the caller doesn't need to do antyhing special.
      
      Fixes a hang on resume on my 830.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      208bf9fd
  17. 19 6月, 2014 1 次提交
  18. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  19. 04 6月, 2014 1 次提交
  20. 05 5月, 2014 5 次提交
  21. 29 3月, 2014 1 次提交
  22. 11 3月, 2014 1 次提交
    • V
      drm/i915: Make encoder cloning more flexible · bc079e8b
      Ville Syrjälä 提交于
      Currently we allow encoders to indicate whether they can be part of a
      cloned set with just one flag. That's not flexible enough to describe
      the actual hardware capabilities. Instead make it a bitmask of encoder
      types with which the current encoder can be cloned.
      
      For now we set the bitmask to allow DVO+DVO and DVO+VGA, which should
      match what the old boolean flag allowed. We will add some more cloning
      options in the future.
      
      Note that this patch also removes the encoder.possible_clones setting
      from encoder setup code - we compute this dynamically.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add Ville's explanation why removing the encoder
      possible_clones is save.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc079e8b
  23. 14 2月, 2014 1 次提交
    • I
      drm/i915: add unregister callback to connector · 4932e2c3
      Imre Deak 提交于
      Since
      
      commit d9255d57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Thu Sep 26 20:05:59 2013 -0300
      
      it became clear that we need to separate the unload sequence into two
      parts:
      
      1. remove all interfaces through which new operations on some object
         (crtc, encoder, connector) can be started and make sure all pending
         operations are completed
      2. do the actual tear down of the internal representation of the above
         objects
      
      The above commit achieved this separation for connectors by splitting
      out the sysfs removal part from the connector's destroy callback and
      doing this removal before calling drm_mode_config_cleanup() which does
      the actual tear-down of all the drm objects.
      
      Since we'll have to customize the interface removal part for different
      types of connectors in the upcoming patches, add a new unregister
      callback and move the interface removal part to it.
      
      No functional change.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4932e2c3
  24. 13 2月, 2014 1 次提交
  25. 19 11月, 2013 1 次提交
  26. 10 10月, 2013 1 次提交
  27. 09 10月, 2013 1 次提交
  28. 01 10月, 2013 4 次提交
    • P
      drm/i915: destroy connector sysfs files earlier · d9255d57
      Paulo Zanoni 提交于
      For some reason, every single time I try to run module_reload
      something tries to read the connector sysfs files. This happens
      after we destroy the encoders and before we destroy the connectors, so
      when the sysfs read triggers the connector detect() function,
      intel_conector->encoder points to memory that was already freed.
      
      The bad backtrace is just:
          [<ffffffff8163ca9a>] dump_stack+0x54/0x74
          [<ffffffffa00c2c8e>] intel_dp_detect+0x1e/0x4b0 [i915]
          [<ffffffffa001913d>] status_show+0x3d/0x80 [drm]
          [<ffffffff813d5340>] dev_attr_show+0x20/0x60
          [<ffffffff81221f50>] ? sysfs_read_file+0x80/0x1b0
          [<ffffffff81221f79>] sysfs_read_file+0xa9/0x1b0
          [<ffffffff811aaf1e>] vfs_read+0x9e/0x170
          [<ffffffff811aba4c>] SyS_read+0x4c/0xa0
          [<ffffffff8164e392>] system_call_fastpath+0x16/0x1b
      
      But if you add tons of memory checking debug options to your Kernel
      you'll also see:
       - general protection fault: 0000
       - BUG kmalloc-4096 (Tainted: G      D W   ): Poison overwritten
       - INFO: Allocated in intel_ddi_init+0x65/0x270 [i915]
       - INFO: Freed in intel_dp_encoder_destroy+0x69/0xb0 [i915]
      Among a bunch of other error messages.
      
      So this commit just destroys the sysfs files before both the encoder
      and connectors are freed.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9255d57
    • D
      drm/i915: Use crtc_clock with the adjusted mode · 241bfc38
      Damien Lespiau 提交于
      struct drm_mode_display now has a separate crtc_ version of the clock to
      be used when we're talking about the timings given to the harwadre (was
      far as the mode is concerned).
      
      This commit is really the result of a git grep adjusted_mode.*clock and
      replacing those by adjusted_mode.crtc_clock. No functional change.
      
      v2: Rebased on drm-intel-queued-next
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Acked-by: NDave Airlie <airlied@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      241bfc38
    • P
      drm/i915: VBT's child_device_config changes over time · 768f69c9
      Paulo Zanoni 提交于
      We currently treat the child_device_config as a simple struct, but
      this is not correct: new BDB versions change the meaning of some
      offsets, so the struct needs to be adjusted for each version.
      
      Since there are too many changes (today we're in version 170!), making
      a big versioned union would be too complicated, so child_device_config
      is now a union of 3 things: (i) a "raw" byte array that's safe to use
      anywhere; (ii)  an "old" structure that's the one we've been using and
      should be safe to keep in the SDVO and TV code; and (iii) a "common"
      structure that should contain only fields that are common for all the
      known VBT versions.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      768f69c9
    • D
      drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern · b14c5679
      Daniel Vetter 提交于
      Done while reviewing all our allocations for fubar. Also a few errant
      cases of lacking () for the sizeof operator - just a bit of OCD.
      
      I've left out all the conversions that also should use kcalloc from
      this patch  (it's only 2).
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b14c5679