public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 1/2] drm/i915: Don't set the 8to6 dither flag when not scaling
Date: Sun, 13 Apr 2014 11:52:47 +0200	[thread overview]
Message-ID: <20140413094941.GA8068@phenom.ffwll.local> (raw)
In-Reply-To: <1390813231-15476-1-git-send-email-daniel.vetter@ffwll.ch>

On Mon, Jan 27, 2014 at 10:00:30AM +0100, Daniel Vetter wrote:
> Apparently we really only need this when the pfit is enabled, at least
> I couldn't dicern any difference here. Furthermore the hacks we have
> to reconstruct this bit is a bit glaring, and probably only works
> because we can't move the lvds port to any other pipe than pipe B on
> gen2/3.
> 
> So let's just rip this out.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I've just written this exact patch again, so figured I might as well merge
it. r-b still appreciated ...
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_lvds.c  | 7 -------
>  drivers/gpu/drm/i915/intel_panel.c | 8 ++++----
>  2 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 8bcb93a2a9f6..8a3ebe940a74 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -111,13 +111,6 @@ static void intel_lvds_get_config(struct intel_encoder *encoder,
>  
>  	pipe_config->adjusted_mode.flags |= flags;
>  
> -	/* gen2/3 store dither state in pfit control, needs to match */
> -	if (INTEL_INFO(dev)->gen < 4) {
> -		tmp = I915_READ(PFIT_CONTROL);
> -
> -		pipe_config->gmch_pfit.control |= tmp & PANEL_8TO6_DITHER_ENABLE;
> -	}
> -
>  	dotclock = pipe_config->port_clock;
>  
>  	if (HAS_PCH_SPLIT(dev_priv->dev))
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index 9f83ab06fb5e..41116753f1c0 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -308,16 +308,16 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
>  		pfit_control |= ((intel_crtc->pipe << PFIT_PIPE_SHIFT) |
>  				 PFIT_FILTER_FUZZY);
>  
> +	/* Make sure pre-965 set dither correctly for 18bpp panels. */
> +	if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18)
> +		pfit_control |= PANEL_8TO6_DITHER_ENABLE;
> +
>  out:
>  	if ((pfit_control & PFIT_ENABLE) == 0) {
>  		pfit_control = 0;
>  		pfit_pgm_ratios = 0;
>  	}
>  
> -	/* Make sure pre-965 set dither correctly for 18bpp panels. */
> -	if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18)
> -		pfit_control |= PANEL_8TO6_DITHER_ENABLE;
> -
>  	pipe_config->gmch_pfit.control = pfit_control;
>  	pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios;
>  	pipe_config->gmch_pfit.lvds_border_bits = border;
> -- 
> 1.8.4.rc3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      parent reply	other threads:[~2014-04-13  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27  9:00 [PATCH 1/2] drm/i915: Don't set the 8to6 dither flag when not scaling Daniel Vetter
2014-01-27  9:00 ` [PATCH 2/2] drm/i915: read lvds_border_bits state from encoder->get_config Daniel Vetter
2014-01-27  9:57   ` [Intel-gfx] " Chris Wilson
2014-01-27 10:18     ` Daniel Vetter
2014-04-13  9:52 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140413094941.GA8068@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox