devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
To: Sravanthi Kollukuduru <skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v2 2/2] drm/msm/dpu: fix for cursor blend issue
Date: Wed, 22 Aug 2018 15:11:00 -0400	[thread overview]
Message-ID: <20180822191100.GY164269@art_vandelay> (raw)
In-Reply-To: <20180822174957.22684-3-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On Wed, Aug 22, 2018 at 11:19:57PM +0530, Sravanthi Kollukuduru wrote:
> The current driver has the opaque blend mode set as the
> default causing the black box effect around the cursor.
> The fix enables choosing a different blend mode for alpha
> enabled formats.
> 
> Changes in V2:
> 	- Use drm_get_format_name() in the logs (Sean)
> 
> Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

I've applied this to dpu-staging/for-next.

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 26 +++++++++++++++++++++-----
>  1 file changed, 21 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 0cd9456a6c4c..07c2d15b45f2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -297,14 +297,29 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
>  }
>  
>  static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
> -		struct dpu_plane_state *pstate)
> +		struct dpu_plane_state *pstate, struct dpu_format *format)
>  {
>  	struct dpu_hw_mixer *lm = mixer->hw_lm;
> +	uint32_t blend_op;
> +	struct drm_format_name_buf format_name;
>  
>  	/* default to opaque blending */
> -	lm->ops.setup_blend_config(lm, pstate->stage, 0XFF, 0,
> -				DPU_BLEND_FG_ALPHA_FG_CONST |
> -				DPU_BLEND_BG_ALPHA_BG_CONST);
> +	blend_op = DPU_BLEND_FG_ALPHA_FG_CONST |
> +		DPU_BLEND_BG_ALPHA_BG_CONST;
> +
> +	if (format->alpha_enable) {
> +		/* coverage blending */
> +		blend_op = DPU_BLEND_FG_ALPHA_FG_PIXEL |
> +			DPU_BLEND_BG_ALPHA_FG_PIXEL |
> +			DPU_BLEND_BG_INV_ALPHA;
> +	}
> +
> +	lm->ops.setup_blend_config(lm, pstate->stage,
> +				0xFF, 0, blend_op);
> +
> +	DPU_DEBUG("format:%s, alpha_en:%u blend_op:0x%x\n",
> +		drm_get_format_name(format->base.pixel_format, &format_name),
> +		format->alpha_enable, blend_op);
>  }
>  
>  static void _dpu_crtc_program_lm_output_roi(struct drm_crtc *crtc)
> @@ -401,7 +416,8 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
>  
>  		/* blend config update */
>  		for (lm_idx = 0; lm_idx < dpu_crtc->num_mixers; lm_idx++) {
> -			_dpu_crtc_setup_blend_cfg(mixer + lm_idx, pstate);
> +			_dpu_crtc_setup_blend_cfg(mixer + lm_idx,
> +						pstate, format);
>  
>  			mixer[lm_idx].flush_mask |= flush_mask;
>  
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

      parent reply	other threads:[~2018-08-22 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 17:49 [PATCH v2 0/2] Enable cursor plane on DPU Sravanthi Kollukuduru
     [not found] ` <20180822174957.22684-1-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-08-22 17:49   ` [PATCH v2 1/2] drm/msm/dpu: enable cursor plane on dpu Sravanthi Kollukuduru
     [not found]     ` <20180822174957.22684-2-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-08-22 19:10       ` Sean Paul
2018-08-22 17:49   ` [PATCH v2 2/2] drm/msm/dpu: fix for cursor blend issue Sravanthi Kollukuduru
     [not found]     ` <20180822174957.22684-3-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-08-22 19:11       ` Sean Paul [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=20180822191100.GY164269@art_vandelay \
    --to=sean-p7ytbzm4h96eqtr555yldq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).