All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kulkarni, Vandita" <vandita.kulkarni@intel.com>
To: "Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Lankhorst, Maarten" <maarten.lankhorst@intel.com>
Subject: Re: [v2] drm/i915: Enable hw workaround to bypass alpha
Date: Fri, 22 Jun 2018 07:37:46 +0000	[thread overview]
Message-ID: <57510F3E2013164E925CD03ED7512A3B7F385D13@BGSMSX108.gar.corp.intel.com> (raw)
In-Reply-To: <20180621210922.xerj5m5hxzjparnd@InViCtUs>



> -----Original Message-----
> From: Sripada, Radhakrishna
> Sent: Friday, June 22, 2018 2:39 AM
> To: Kulkarni, Vandita <vandita.kulkarni@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; Lankhorst, Maarten
> <maarten.lankhorst@intel.com>
> Subject: Re: [Intel-gfx] [v2] drm/i915: Enable hw workaround to bypass
> alpha
> 
> On Thu, Jun 21, 2018 at 08:43:56PM +0530, Vandita Kulkarni wrote:
> > Alpha blending with alpha 0 and 0xff passes through alpha math and
> > rounding logic causing differences compared to fully transparent or
> > opaque plane,resulting in CRC mismatch.
> > This WA on icl and above enables hardware to bypass alpha math and
> > rounding for per pixel alpha values of 00 and 0xff
> >
> > v2: Fix patchwork checkpatch warnings.
> >
> > Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_reg.h      |  8 ++++++++
> >  drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
> >  2 files changed, 20 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> > b/drivers/gpu/drm/i915/i915_reg.h index 4bfd7a9..b66ec9b 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -7366,6 +7366,14 @@ enum {
> >  #define BDW_SCRATCH1
> 	_MMIO(0xb11c)
> >  #define  GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE	(1 <<
> 2)
> >
> > +/*GEN11 chicken */
> > +#define _PIPEA_CHICKEN			0x70038
> > +#define _PIPEB_CHICKEN			0x71038
> > +#define _PIPEC_CHICKEN			0x72038
> > +#define  PER_PIXEL_ALPHA_BYPASS_EN	(1 << 7)
> > +#define PIPE_CHICKEN(pipe)		_MMIO_PIPE(pipe,
> _PIPEA_CHICKEN,\
> > +						   _PIPEB_CHICKEN)
> > +
> >  /* PCH */
> >
> >  /* south display engine interrupt: IBX */ diff --git
> > a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 2c8fef3..3d849ec 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -5632,6 +5632,7 @@ static void haswell_crtc_enable(struct
> intel_crtc_state *pipe_config,
> >  	struct intel_atomic_state *old_intel_state =
> >  		to_intel_atomic_state(old_state);
> >  	bool psl_clkgate_wa;
> > +	u32 pipe_chicken;
> >
> >  	if (WARN_ON(intel_crtc->active))
> >  		return;
> > @@ -5691,6 +5692,17 @@ static void haswell_crtc_enable(struct
> intel_crtc_state *pipe_config,
> >  	 */
> >  	intel_color_load_luts(&pipe_config->base);
> >
> > +	/*
> > +	 * Display WA #1153: enable hardware to bypass the alpha math
> > +	 * and rounding for per-pixel values 00 and 0xff
> > +	 */
> > +	if (INTEL_GEN(dev_priv) >= 11) {
> > +		pipe_chicken = I915_READ(PIPE_CHICKEN(pipe));
> > +		if (!(pipe_chicken & PER_PIXEL_ALPHA_BYPASS_EN))
> > +			I915_WRITE_FW(PIPE_CHICKEN(pipe),
> > +				      pipe_chicken |
> PER_PIXEL_ALPHA_BYPASS_EN);
> > +	}
> This would enable the wa by default for gen > 11. Would this impact for non
> 00, 0xff alpha cases?
No Impact on non 0xff or 00 cases.
Verified on icl.
> In other words, should we enable the wa only when alpha is 00/0xff and not
> enable for other values?
No it can remain set.
> 
> Thanks,
> Radhakrishna(RK) Sripada
> > +
> >  	intel_ddi_set_pipe_settings(pipe_config);
> >  	if (!transcoder_is_dsi(cpu_transcoder))
> >  		intel_ddi_enable_transcoder_func(pipe_config);
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-06-22  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 15:13 [v2] drm/i915: Enable hw workaround to bypass alpha Vandita Kulkarni
2018-06-21 16:02 ` ✓ Fi.CI.BAT: success for drm/i915: Enable hw workaround to bypass alpha (rev2) Patchwork
2018-06-21 21:09 ` [v2] drm/i915: Enable hw workaround to bypass alpha Radhakrishna Sripada
2018-06-22  7:37   ` Kulkarni, Vandita [this message]
2018-06-22  8:42   ` Lankhorst, Maarten
2018-06-21 22:22 ` ✓ Fi.CI.IGT: success for drm/i915: Enable hw workaround to bypass alpha (rev2) Patchwork

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=57510F3E2013164E925CD03ED7512A3B7F385D13@BGSMSX108.gar.corp.intel.com \
    --to=vandita.kulkarni@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@intel.com \
    --cc=radhakrishna.sripada@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.