1. 19 4月, 2013 4 次提交
  2. 18 4月, 2013 22 次提交
  3. 07 4月, 2013 1 次提交
  4. 06 4月, 2013 2 次提交
  5. 03 4月, 2013 10 次提交
    • D
      drm/i915: create pipe_config->dpll for clock state · f47709a9
      Daniel Vetter 提交于
      Clock computations and handling are highly encoder specific, both in
      the optimal clock selection and also in which clocks to use and when
      sharing of clocks is possible.
      
      So the best place to do this is somewhere in the encoders, with a
      generic fallback for those encoders without special needs. To facility
      this, add a pipe_config->clocks_set boolean.
      
      This patch here is only prep work, it simply sets the computed clock
      values in pipe_config->dpll, and uses that data in the hw clock
      setting functions.
      
      Haswell code isn't touched, simply because Haswell clocks work much
      different and need their own infrastructure (with probably a
      Haswell-specific config->ddi_clock substruct).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f47709a9
    • D
      drm/i915: hw readout support for ->has_pch_encoders · 88adfff1
      Daniel Vetter 提交于
      Now we can ditch the checks in the Haswell disable code.
      
      v2: add support for Haswell
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88adfff1
    • D
      drm/i915: add hw state readout/checking for pipe_config · 0e8ffe1b
      Daniel Vetter 提交于
      We need to be able to read out the hw state code for a bunch
      of reasons:
      - Correctly disabling boot-up/resume state.
      - Pure paranoia.
      
      Since not all of the pipe configuration is e.g. relevant for
      fastboot (or at least we can allow some wiggle room in some
      parameters, like the clocks), we need to add a strict_checking
      parameter to intel_pipe_config_compare for fastboot.
      
      For now intel_pipe_config_compare should be fully paranoid and
      check everything that the hw state readout code supports. Which
      for this infrastructure code is nothing.
      
      I've gone a bit overboard with adding 3 get_pipe_config functions:
      The ilk version will differ with the next patch, so it's not too
      onerous.
      
      v2: Don't check the hw config if the pipe is off, since an enabled,
      but dpms off crtc will obviously have tons of difference with the hw
      state.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0e8ffe1b
    • D
      drm/i915: rip out superflous is_dp&is_cpu_edp tracking · 8b47047b
      Daniel Vetter 提交于
      The only exception left is is_cpu_edp in the haswell modeset code.
      We need that to assign the cpu transcoder, but we might want to
      move that eventually into the encoder, too.
      
      \o/-by: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8b47047b
    • D
      drm/i915: track dp target_clock in pipe_config · df92b1e6
      Daniel Vetter 提交于
      We need it in the fdi m_n computation, which nicely kills almost
      all ugly special cases in there.
      
      It looks like we also need this to handle 12bpc hdmi correctly.
      
      Eventually it might be better to switch things around and put the
      target clock into adjusted_mode->clock and create a new pipe_config
      parameter for the port link clock.
      
      v2: Add a massive comment in the code to explain this mess.
      
      v3: s/dp_target_clock/pixel_target_clock in anticipation of the hdmi
      use-case.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      df92b1e6
    • D
      drm/i915: move dp_m_n computation to dp_encoder->compute_config · 03afc4a2
      Daniel Vetter 提交于
      We need a flag to designate dp encoders and the dp link m_n parameters
      in the pipe config for that. And now that the pipe bpp computations
      have been moved up and stored in the pipe config, too, we can do this
      without losing our sanity.
      
      v2: Rebased on top of Takashi Iwai's fix to (again) fix the target
      clock handling for eDP. Luckily the new code is sane enough and just
      does the right thing!
      
      v3: Move ->has_dp_encoder to this patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      03afc4a2
    • D
      drm/i915: clear up the fdi/dp set_m_n confusion · 6cf86a5e
      Daniel Vetter 提交于
      There's a rather decent confusion going on around transcoder m_n
      values. So let's clarify:
      - All dp encoders need this, either on the pch transcoder if it's a
        pch port, or on the cpu transcoder/pipe if it's a cpu port.
      - fdi links need to have the right m_n values for the fdi link set in
        the cpu transcoder.
      
      To handle the pch vs transcoder stuff a bit better, extract transcoder
      set_m_n helpers. To make them simpler, set intel_crtc->cpu_transcoder
      als in ironlake_crtc_mode_set, so that gen5+ (where the cpu m_n
      registers are all at the same offset) can use it.
      
      Haswell modeset is decently confused about dp vs. edp vs. fdi. dp vs.
      edp works exactly the same as dp (since there's no pch dp any more),
      so use that as a check. And only set up the fdi m_n values if we
      really have a pch encoder present (which means we have a VGA encoder).
      
      On ilk+ we've called ironlake_set_m_n both for cpu_edp and for pch
      encoders. Now that dp_set_m_n handles all dp links (thanks to the
      pch encoder check), we can ditch the cpu_edp stuff from the
      fdi_set_m_n function.
      
      Since the dp_m_n values are not readily available, we need to
      carefully coax the edp values out of the encoder. Hence we can't (yet)
      kill this superflous complexity.
      
      v2: Rebase on top of the ivb fdi B/C check patch - we need to properly
      clear intel_crtc->fdi_lane, otherwise those checks will misfire.
      
      v3: Rebased on top of a s/IS_HASWELL/HAS_DDI/ patch from Paulo Zanoni.
      
      v4: Drop the addition of has_dp_encoder, it's in the wrong patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6cf86a5e
    • J
      drm/i915: add sprite assertion function for VLV · 19332d7a
      Jesse Barnes 提交于
      Need to make sure sprites are disabled before shutting off a pipe.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      19332d7a
    • J
      drm/i915: sprite support for ValleyView v4 · 7f1f3851
      Jesse Barnes 提交于
      No constant alpha yet though, that needs a new ioctl and/or property to
      get/set.
      
      v2: use drm_plane_format_cpp (Ville)
          fix up vlv_disable_plane, remove IVB bits (Ville)
          remove error path rework (Ville)
          fix component order confusion (Ville)
          clean up platform init (Ville)
          use compute_offset_xtiled (Ville)
      v3: fix up more format confusion (Ville)
          update to new page offset function (Ville)
      v4: remove incorrect formats from framebuffer_init (Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7f1f3851
    • C
      drm/i915: Skip modifying PCH DREF if not changing clock sources · 74cfd7ac
      Chris Wilson 提交于
      Modifying the clock sources (via the DREF control on the PCH) is a slow
      multi-stage process as we need to let the clocks stabilise between each
      stage. If we are not actually changing the clock sources, then we can
      return early.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      [danvet: Appease checkpatch by deleting a space after a ~]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      74cfd7ac
  6. 28 3月, 2013 1 次提交
    • D
      drm/i915: fixup fb bpp computation in pipe_config_set_bpp · d42264b1
      Daniel Vetter 提交于
      Ville pointed out that my assumption that no unsupported pixel format
      can get past the pipe config computation stage to the platform
      update_plane callbacks is wrong. The reason is that this function
      still checks the old fb->depth value instead of the new pixel_format.
      
      While checking with all the other places that use this I've noticed
      that intel_framebuffer_init already has all the platform checks we
      need, so replace those checks with a WARN_ON.
      
      Since fb->depth isn't set for YUV pixel formats and since we already
      can't create an fb with an rgb layout not support on the running
      platform I /think/ this patch doesn't fix any bug.
      
      But it surely looks better!
      
      v2: BGR formats are also only gen4+, so add the corresponding WARN_ON,
      too (Ville).
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d42264b1