dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Chris Paterson <Chris.Paterson2@renesas.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	David Airlie <airlied@linux.ie>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	dri-devel@lists.freedesktop.org,
	Biju Das <biju.das@bp.renesas.com>,
	linux-renesas-soc@vger.kernel.org,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	LUU HOAI <hoai.luu.ub@renesas.com>
Subject: Re: [PATCH v2] drm: rcar-du: Fix Alpha blending issue on Gen3
Date: Wed, 27 Apr 2022 00:46:11 +0300	[thread overview]
Message-ID: <YmhoI3AimOR5ovMj@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220426084157.10979-1-biju.das.jz@bp.renesas.com>

Hi Biju,

Thank you for the patch.

On Tue, Apr 26, 2022 at 09:41:57AM +0100, Biju Das wrote:
> From: LUU HOAI <hoai.luu.ub@renesas.com>
> 
> As per R-Car-Gen3_Common_OPC_Customer_Notifications_V30.1.pdf,
> unexpected image output(such as incorrect colors or planes being
> invisible) can happen on the below conditions, as PnALPHAR register
> is not initialized by reset.
> 
> When alpha blending (PpMRm.PpSPIM=0b101) is performed and:
> 	•two Planes are enabled on any DUn (n=0,1,2,3)
> 		oDSPRn= 0x0000 0031 or 0x0000 0013
> 	•or DU0 and DU1 is used for display at the same time
> 		oDSPR0= 0x0000 0001 and DSPR1= 0x0000 0003
> 		oDSPR0= 0x0000 0003 and DSPR1= 0x0000 0001
> 	•or DU2 and DU3(H3 Only) is used for display at the same time
> 		oDSPR2= 0x0000 0001 and DSPR3= 0x0000 0003
> 		oDSPR2= 0x0000 0003 and DSPR3= 0x0000 0001
> 
> This patch set PnALPHAR register to 0 to avoid this issue.
> 
> Signed-off-by: LUU HOAI <hoai.luu.ub@renesas.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v1->v2:
>  * Updated commit description
>  * Updated the code comments
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> index f214a8b6cfd3..aa80c44dd8d7 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -510,6 +510,18 @@ static void rcar_du_plane_setup_format_gen3(struct rcar_du_group *rgrp,
>  
>  	rcar_du_plane_write(rgrp, index, PnDDCR4,
>  			    state->format->edf | PnDDCR4_CODE);
> +
> +	/*
> +	 * On Gen3, some DU channels have two planes, each being wired to a
> +	 * separate VSPD instance. The DU can then blend two planes. While
> +	 * this feature isn't used by the driver, issues related to alpha
> +	 * blending (such as incorrect colors or planes being invisible) may
> +	 * still occur if the PnALPHAR register has a stale value. Set the
> +	 * register to 0 to avoid this.
> +	 */
> +
> +	/* TODO: Check if alpha-blending should be disabled in PnMR. */
> +	rcar_du_plane_write(rgrp, index, PnALPHAR, 0);
>  }
>  
>  static void rcar_du_plane_setup_format(struct rcar_du_group *rgrp,

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-04-26 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  8:41 [PATCH v2] drm: rcar-du: Fix Alpha blending issue on Gen3 Biju Das
2022-04-26 21:46 ` Laurent Pinchart [this message]
2022-05-13 10:15 ` Kieran Bingham
2022-05-17 18:03   ` Biju Das

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=YmhoI3AimOR5ovMj@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=airlied@linux.ie \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=hoai.luu.ub@renesas.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox