1. 30 4月, 2013 14 次提交
    • D
      drm/i915: implement fdi auto-dithering · e29c22c0
      Daniel Vetter 提交于
      So on a bunch of setups we only have 2 fdi lanes available, e.g. hsw
      VGA or 3 pipes on ivb. And seemingly a lot of modes don't quite fit
      into this, among them the default 1080p mode.
      
      The solution is to dither down the pipe a bit so that everything fits,
      which this patch implements.
      
      But ports compute their state under the assumption that the bpp they
      pick will be the one selected, e.g. the display port bw computations
      won't work otherwise. Now we could adjust our code to again up-dither
      to the computed DP link parameters, but that's pointless.
      
      So instead when the pipe needs to adjust parameters we need to retry
      the pipe_config computation at the encoder stage. Furthermore we need
      to inform encoders that they should not increase bandwidth
      requirements if possible. This is required for the hdmi code, which
      prefers the pipe to up-dither to either of the two possible hdmi bpc
      values.
      
      LVDS has a similar requirement, although that's probably only
      theoretical in nature: It's unlikely that we'll ever see an 8bpc
      high-res lvds panel (which is required to hit the 2 fdi lane limit).
      
      eDP is the only thing which could increase the pipe_bpp setting again,
      even when in the retry-loop. This could hit the WARN. Two reasons for
      not bothering:
      - On many eDP panels we'll get a black screen if the bpp settings
        don't match vbt. So failing the modeset is the right thing to do.
        But since that also means it's the only way to light up the panel,
        it should work. So we shouldn't be able to hit this WARN.
      - There are still opens around the eDP panel handling, and maybe we
        need additional tricks. Before that happens it's imo no use trying
        to be too clever.
      Worst case we just need to kill that WARN or maybe fail the compute
      config stage if the eDP connector can't get the bpp setting it wants.
      And since this can only happen with an fdi link in between and so for
      pch eDP panels it's rather unlikely to blow up, if ever.
      
      v2: Rebased on top of a bikeshed from Paulo.
      
      v3: Improve commit message around eDP handling with the stuff
      things with Imre.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e29c22c0
    • D
      drm/i915: fixup 12bpc hdmi dotclock handling · 325b9d04
      Daniel Vetter 提交于
      We need to multiply the hdmi port dotclock by 1.5x since it's not
      really a dotclock, but the 10/8 encoding bitclock divided by 10.
      
      Also add correct limit checks for the dotclock and reject modes which
      don't fit. HDMI 1.4 would allow more, but our hw doesn't support that
      unfortunately :(
      
      Somehow I suspect 12bpc hdmi output never really worked - we really
      need an i-g-t testcase to check all the different pixel modes and
      outputs.
      
      v2: Fixup the adjusted port clock handling - we need to make sure that
      the fdi link code still gets the real pixelclock.
      
      v3: g4x/vlv don't support 12bpc hdmi output so drop the bogus comment.
      Acked-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Switch dotclock limit check to <= as suggested by Ville.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      325b9d04
    • D
      drm/i915: don't count cpu ports for fdi B/C lane sharing · 1e833f40
      Daniel Vetter 提交于
      This allows us to use all 4 fdi lanes on fdi B when the cpu eDP is
      running on pipe C. Yay!
      
      v2: Encapsulate test into a little helper function, as suggested by
      Chris Wilson.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1e833f40
    • D
      drm/i915: move fdi lane configuration checks ahead · 1857e1da
      Daniel Vetter 提交于
      This nicely allows us to drop some hacks which have only been used
      to work around modeset failures due to lack of fdi lanes.
      
      v2: Implement proper checking for Haswell platforms - the fdi link to
      the LPT PCH has only 2 lanes. Note that we already filter out
      impossible modes in intel_crt_mode_valid. Unfortunately LPT does not
      support 6bpc on the fdi rx, so we can't pull clever tricks to squeeze
      in a few more modes.
      
      v2: Rebased on top of Ben Widawsky's num_pipes reorg.
      
      v3: Rebase on top of Ville's pipe debug output ocd rampage.
      
      v4: Fixup rebase fail spotted by Ville.
      
      v5: Fixup rebase fail spotted by Imre Deak. I suck.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1857e1da
    • D
      drm/i915: Split up ironlake_check_fdi_lanes · ebfd86fd
      Daniel Vetter 提交于
      Again in preparation to move the configuration checks into the
      pipe_config computation stage of the modeset sequence.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ebfd86fd
    • D
      drm/i915: compute fdi lane config earlier · 877d48d5
      Daniel Vetter 提交于
      Now that it's split up, we can easily move it around and precompute
      the fdi lane configuration.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      877d48d5
    • D
      drm/i915: split up fdi_set_m_n into computation and hw setup · ca3a0ff8
      Daniel Vetter 提交于
      And also move the computed m_n values into the pipe_config. This is a
      prep step to move the fdi state computation completely into the
      prepare phase of the modeset sequence. Which will allow us to handle
      fdi link bw constraints in a better way.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca3a0ff8
    • D
      drm/i915: hw state readout support for pipe_config->fdi_lanes · 627eb5a3
      Daniel Vetter 提交于
      v2: Introduce some nice #defines for the FDI lane width fields and put
      them to good use. Suggested by Ville.
      
      v3: Fixup the mask vs. shift copy&pasta fail Imre Deak spotted, and
      use the shift #define also in the mask.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      627eb5a3
    • D
      drm/i915: move intel_crtc->fdi_lanes to pipe_config · 33d29b14
      Daniel Vetter 提交于
      We need this for two reasons:
      - Correct handling of shared fdi lanes on ivb with fastboot.
      - Handling fdi link bw limits when we only have two fdi lanes by
        dithering down a bit.
      
      Just search&replace in this patch, no functional change at all.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      33d29b14
    • D
      drm/i915: allow high-bpc modes on DP · 52541e30
      Daniel Vetter 提交于
      Totally untested due to lack of screens supporting more than 8bpc. But
      now we should have closed all holes in our bpp handling, so this
      should be safe. The last missing piece was 10bpc support for g4x/vlv,
      since we directly use the pipe bpp to feed the display link (and
      anyway, only the cpt has any means to have a pipe bpp != the display
      link bpp).
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      52541e30
    • D
      drm/i915: implement high-bpc + pipeconf-dither support for g4x/vlv · ff9ce46e
      Daniel Vetter 提交于
      The current code is rather ... ugly. The only thing it managed to pull
      off is getting 6bpc on DP working on g4x. Then someone added another
      custom hack for 6bpc eDP on vlv. Fix up this entire mess by properly
      implementing the PIPECONF-based dither/bpc controls on g4x/vlv.
      
      Note that compared to pch based platforms g4x/vlv don't support 12bpc
      modes. g4x is already caught, extend the check for vlv.
      
      The other fixup is to restrict the lvds-specific dithering to early
      gen4 devices - g4x should use the pipeconf dither controls. Note that
      on gen2/3 the dither control is in the panel fitter even.
      
      v2: Don't enable dithering when the pipe is in 10 bpc mode. Quoting
      from Bspec "PIPEACONF - Pipe A Configuration Register, bit 4":
      
      "Programming note: Dithering should only be enabled for 8 bpc or 6
      bpc."
      
      v3: Actually drop the old ugly dither code.
      
      v4: Explain in a short comment why g4x/vlv shouldn't dither for 30 bpp
      pipes (Jesse).
      
      v5: Also clear the dither type correctly as spotted by Ville.
      
      v6: As Ville pointed out we need to indeed set the dithering both in
      the pipeconf register (for DP outputs) and in the LVDS port register
      (for LVDS ouputs). Otherwise LVDS panel will not get properly
      dithered. The old patch got away with this since it forgot to clear
      the LVDS dither bit ...
      
      v7: Remove redundant BPC_MASK clearing, spotted by 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>
      ff9ce46e
    • D
      drm/i915: drop adjusted_mode from *_set_pipeconf functions · 6ff93609
      Daniel Vetter 提交于
      They can get at the adjusted mode through intel_crtc->config.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ff93609
    • D
      drm/i915: force bpp for eDP panels · af13188a
      Daniel Vetter 提交于
      We've had our fair share of woes already which showed that we can't
      rely on the bpc limits in the EDID for eDP panels without risking
      black screens. So now we limit the depth by what the BIOS recommends
      in the VBT:
      
      commit 2f4f649a
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Mon Nov 12 14:33:44 2012 +0200
      
          drm/i915: do not ignore eDP bpc settings from vbt
      
      But that's not enough, since at least the panel on my ASUS Zenbook
      Prime here is also unhappy if the bpc is too low. Hence just take the
      firmware value and dither to get what flimsy panels want.
      
      Like before we ensure that we don't change the bpp if the firmware
      doesn't provide a value, see
      
      commit 9a30a61f
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Mon Nov 12 14:33:45 2012 +0200
      
          drm/i915: do not default to 18 bpp for eDP if missing from VBT
      
      v2: Apparently there are some horribly broken eDP panels around which
      only work if the DP link is set up as if we want to driver a 24bpp
      mode, but still only work if the data is feed at 18bpp. See
      
      commit 57c21963
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Apr 4 17:19:37 2013 +0200
      
          drm/i915: revert eDP bpp clamping code changes
      
      for the gory details.
      
      Adjust the patch accordingly and update all the relevant comments.
      
      v3: Give up on the cargo-culting v2 attempt and just enfore the edp
      bpp value if it's there. Broken panels be damned!
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Tested-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      af13188a
    • D
      drm/i915: put the right cpu_transcoder into pipe_config for hw state readout · 60c4ae10
      Daniel Vetter 提交于
      This hack is getting a bit messy, but this plugs the leak for now
      until we have the cpu_transcoder properly pipe_config'ed.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      60c4ae10
  2. 27 4月, 2013 2 次提交
  3. 26 4月, 2013 10 次提交
  4. 25 4月, 2013 7 次提交
  5. 24 4月, 2013 6 次提交
  6. 23 4月, 2013 1 次提交