[PATCH v2 1/3] media: vsp1: add premultiplied alpha support

Takanari Hayama taki at igel.co.jp
Tue Aug 16 06:01:30 UTC 2022


Hi,

> 2022/08/11 2:41、Sergey Shtylyov <s.shtylyov at omp.ru>のメール:
> 
> Hello!
> 
> On 8/10/22 11:37 AM, Takanari Hayama wrote:
> 
>> To support DRM blend mode in R-Car DU driver, we must be able to pass
>> a plane with the premultiplied alpha. Adding a new property to
>> vsp1_du_atomic_config allows the R-Car DU driver to pass the
>> premultiplied alpha plane.
>> 
>> Signed-off-by: Takanari Hayama <taki at igel.co.jp>
>> ---
>> drivers/media/platform/renesas/vsp1/vsp1_drm.c | 2 ++
>> include/media/vsp1.h                           | 2 ++
>> 2 files changed, 4 insertions(+)
>> 
>> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drm.c b/drivers/media/platform/renesas/vsp1/vsp1_drm.c
>> index 0c2507dc03d6..019e18976bd8 100644
>> --- a/drivers/media/platform/renesas/vsp1/vsp1_drm.c
>> +++ b/drivers/media/platform/renesas/vsp1/vsp1_drm.c
>> @@ -856,6 +856,8 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int pipe_index,
>> 	rpf->mem.addr[1] = cfg->mem[1];
>> 	rpf->mem.addr[2] = cfg->mem[2];
>> 
>> +	rpf->format.flags = (cfg->premult) ? V4L2_PIX_FMT_FLAG_PREMUL_ALPHA : 0;
>> +
> 
>  Parens are hardly needed here... :-)

True. :) Thank you.

Cheers,
Takanari Hayama, Ph.D. <taki at igel.co.jp>
IGEL Co., Ltd.
https://www.igel.co.jp/


More information about the dri-devel mailing list