* [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane
2026-09-01 17:17 [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane Icenowy Zheng
@ 2026-09-01 17:17 ` Icenowy Zheng
2026-09-01 17:39 ` sashiko-bot
2026-09-10 8:50 ` Thomas Zimmermann
2026-09-01 17:27 ` [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane sashiko-bot
` (2 subsequent siblings)
3 siblings, 2 replies; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-01 17:17 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
Icenowy Zheng, Icenowy Zheng
Blend mode properties are now required to expose pixel formats w/ alpha.
Experiments show that the fixed blending mode for the cursor seems to be
COVERAGE:
- With a cursor plane filled with R=G=0, B=0xff, A=0x40, the cursor is
visible on a pure-white background, which means the background is
multiplied.
- With a cursor plane filled with R=G=B=0xff, A=0x40, the cursor isn't
pure white and non-white patterns can be see through, which means the
cursor is multiplied.
Add a fixed COVERAGE blend mode property for the cursor plane.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
index fa4f601dd0c87..36e3664373fa1 100644
--- a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
+++ b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
@@ -11,6 +11,7 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
#include <drm/drm_crtc.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
@@ -268,5 +269,7 @@ struct drm_plane *vs_cursor_plane_init(struct drm_device *drm_dev,
drm_plane_helper_add(plane, &vs_cursor_plane_helper_funcs);
+ drm_plane_create_blend_mode_property(plane,
+ BIT(DRM_MODE_BLEND_COVERAGE));
return plane;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane
2026-09-01 17:17 ` [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane Icenowy Zheng
@ 2026-09-01 17:39 ` sashiko-bot
2026-09-10 8:50 ` Thomas Zimmermann
1 sibling, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-09-01 17:39 UTC (permalink / raw)
To: Icenowy Zheng; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The cursor plane's blend mode property is created supporting only COVERAGE, but the default atomic state initialization sets it to PREMULTI, causing atomic commits to fail.
--
commit 8e0ec23e99807ff97fec9437ae15ac650e658045
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
drm/verisilicon: set blend mode for the cursor plane
This commit adds a fixed COVERAGE blend mode property for the cursor plane,
as blend mode properties are now required to expose pixel formats with alpha.
> diff --git a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> index fa4f601dd0c87..36e3664373fa1 100644
> --- a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
[ ... ]
> @@ -268,5 +269,7 @@ struct drm_plane *vs_cursor_plane_init(struct drm_device *drm_dev,
>
> drm_plane_helper_add(plane, &vs_cursor_plane_helper_funcs);
>
> + drm_plane_create_blend_mode_property(plane,
> + BIT(DRM_MODE_BLEND_COVERAGE));
[Severity: High]
Will this cause atomic commits to fail during state restoration?
Looking at the plane setup, vs_cursor_plane_funcs uses the default
drm_atomic_helper_plane_reset() hook, which unconditionally initializes the
plane state's pixel_blend_mode to DRM_MODE_BLEND_PREMULTI.
Because this property is created supporting only DRM_MODE_BLEND_COVERAGE,
there is a mismatch with the initial state. When userspace queries the
initial state, it reads PREMULTI. If it attempts to write this state back
during an atomic commit (for instance, during a VT switch in a compositor),
the commit will fail with -EINVAL since PREMULTI is not in the supported
blend mode enum list.
> return plane;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901171703.1161592-1-zhengxingda@iscas.ac.cn?part=2
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane
2026-09-01 17:17 ` [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane Icenowy Zheng
2026-09-01 17:39 ` sashiko-bot
@ 2026-09-10 8:50 ` Thomas Zimmermann
1 sibling, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 8:50 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
Icenowy Zheng
Am 01.09.26 um 19:17 schrieb Icenowy Zheng:
> Blend mode properties are now required to expose pixel formats w/ alpha.
>
> Experiments show that the fixed blending mode for the cursor seems to be
> COVERAGE:
>
> - With a cursor plane filled with R=G=0, B=0xff, A=0x40, the cursor is
> visible on a pure-white background, which means the background is
> multiplied.
> - With a cursor plane filled with R=G=B=0xff, A=0x40, the cursor isn't
> pure white and non-white patterns can be see through, which means the
> cursor is multiplied.
>
> Add a fixed COVERAGE blend mode property for the cursor plane.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> index fa4f601dd0c87..36e3664373fa1 100644
> --- a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
> @@ -11,6 +11,7 @@
>
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_blend.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_fourcc.h>
> #include <drm/drm_framebuffer.h>
> @@ -268,5 +269,7 @@ struct drm_plane *vs_cursor_plane_init(struct drm_device *drm_dev,
>
> drm_plane_helper_add(plane, &vs_cursor_plane_helper_funcs);
>
> + drm_plane_create_blend_mode_property(plane,
> + BIT(DRM_MODE_BLEND_COVERAGE));
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Please see the other patch for my comments on coding style.
> return plane;
> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-01 17:17 [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane Icenowy Zheng
2026-09-01 17:17 ` [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane Icenowy Zheng
@ 2026-09-01 17:27 ` sashiko-bot
2026-09-10 7:09 ` Icenowy Zheng
2026-09-10 8:49 ` Thomas Zimmermann
3 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-09-01 17:27 UTC (permalink / raw)
To: Icenowy Zheng; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Medium] The return value of `drm_plane_create_blend_mode_property` is ignored.
Pre-existing issues:
- [Critical] Dereferencing a NULL `crtc` pointer in `vs_primary_plane_atomic_disable` during offscreen plane transitions.
- [High] `vs_primary_plane_atomic_disable` incorrectly sets the enable bit instead of clearing it.
--
commit 9aa67f5c63b091d89b8b4a7a3066a896f35cf108
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
drm/verisilicon: set blend mode for the primary plane
Blend modes are now required to expose pixel formats w/ alpha.
As it's the primary plane and blending is explicitly disabled, just
expose PIXEL_NONE blend mode.
> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> index 1f2be41ae496c..8d58682d88ef8 100644
> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> @@ -7,6 +7,7 @@
>
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_blend.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_fourcc.h>
> #include <drm/drm_framebuffer.h>
[ ... ]
[Severity: Critical]
This is a pre-existing issue, but can this dereference a NULL pointer during
offscreen plane transitions?
If userspace commits an atomic state where a plane transitions from fully
disabled (old_state->crtc == NULL) to assigned but offscreen
(new_state->crtc != NULL but new_state->visible == false), the DRM core
calls vs_primary_plane_atomic_update().
This function sees !state->visible and delegates to the disable function:
vs_primary_plane_atomic_update() {
...
if (!state->visible) {
vs_primary_plane_atomic_disable(plane, atomic_state);
return;
}
...
}
The disable function then fetches old_state->crtc, which is NULL, and
dereferences it:
vs_primary_plane_atomic_disable() {
...
struct drm_plane_state *state = drm_atomic_get_old_plane_state(atomic_state,
plane);
struct drm_crtc *crtc = state->crtc;
struct vs_crtc *vcrtc = drm_crtc_to_vs_crtc(crtc);
unsigned int output = vcrtc->id;
...
}
[Severity: High]
This isn't a bug introduced by this patch, but does
vs_primary_plane_atomic_disable() incorrectly set the enable bit instead of
clearing it?
vs_primary_plane_atomic_disable() {
...
regmap_set_bits(dc->regs, VSDC_FB_CONFIG_EX(output),
VSDC_FB_CONFIG_EX_FB_EN);
vs_primary_plane_commit(dc, output);
}
When the plane needs to be disabled, the core calls this function, which uses
regmap_set_bits() with the VSDC_FB_CONFIG_EX_FB_EN bit.
Should this use regmap_clear_bits() instead? The hardware plane is never
disabled, which can cause visual corruption, unexpected display state, and
potential memory access faults if the buffer memory is subsequently freed
while the hardware is still scanning it out.
> @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct drm_device *drm_dev, struct vs_dc
>
> drm_plane_helper_add(plane, &vs_primary_plane_helper_funcs);
>
> + drm_plane_create_blend_mode_property(plane,
> + BIT(DRM_MODE_BLEND_PIXEL_NONE));
[Severity: Medium]
Is it intentional to ignore the return value of
drm_plane_create_blend_mode_property()?
If property creation fails (e.g. due to memory exhaustion), the plane is
initialized without the requested blend mode property, breaking userspace
expectations for alpha formats. Should this function check for an error code
and handle the failure?
> return plane;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901171703.1161592-1-zhengxingda@iscas.ac.cn?part=1
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-01 17:17 [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane Icenowy Zheng
2026-09-01 17:17 ` [PATCH 2/2] drm/verisilicon: set blend mode for the cursor plane Icenowy Zheng
2026-09-01 17:27 ` [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane sashiko-bot
@ 2026-09-10 7:09 ` Icenowy Zheng
2026-09-10 7:58 ` Thomas Zimmermann
2026-09-10 8:49 ` Thomas Zimmermann
3 siblings, 1 reply; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 7:09 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
> Blend modes are now required to expose pixel formats w/ alpha.
>
> As it's the primary plane and blending is explicitly disabled, just
> expose PIXEL_NONE blend mode.
Gently ping for reviews.
Thanks,
Icenowy
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> index 1f2be41ae496c..8d58682d88ef8 100644
> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> @@ -7,6 +7,7 @@
>
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_blend.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_fourcc.h>
> #include <drm/drm_framebuffer.h>
> @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct
> drm_device *drm_dev, struct vs_dc
>
> drm_plane_helper_add(plane, &vs_primary_plane_helper_funcs);
>
> + drm_plane_create_blend_mode_property(plane,
> +
> BIT(DRM_MODE_BLEND_PIXEL_NONE));
> return plane;
> }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 7:09 ` Icenowy Zheng
@ 2026-09-10 7:58 ` Thomas Zimmermann
2026-09-10 8:00 ` Icenowy Zheng
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 7:58 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
Hi
Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
> 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
>> Blend modes are now required to expose pixel formats w/ alpha.
>>
>> As it's the primary plane and blending is explicitly disabled, just
>> expose PIXEL_NONE blend mode.
> Gently ping for reviews.
What do these alpha formats do? Are they a hardware feature? It looks
like they are programmable, but don't differ from XRGB at all.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>> ---
>> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>> index 1f2be41ae496c..8d58682d88ef8 100644
>> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>> @@ -7,6 +7,7 @@
>>
>> #include <drm/drm_atomic.h>
>> #include <drm/drm_atomic_helper.h>
>> +#include <drm/drm_blend.h>
>> #include <drm/drm_crtc.h>
>> #include <drm/drm_fourcc.h>
>> #include <drm/drm_framebuffer.h>
>> @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct
>> drm_device *drm_dev, struct vs_dc
>>
>> drm_plane_helper_add(plane, &vs_primary_plane_helper_funcs);
>>
>> + drm_plane_create_blend_mode_property(plane,
>> +
>> BIT(DRM_MODE_BLEND_PIXEL_NONE));
>> return plane;
>> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 7:58 ` Thomas Zimmermann
@ 2026-09-10 8:00 ` Icenowy Zheng
2026-09-10 8:31 ` Thomas Zimmermann
0 siblings, 1 reply; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 8:00 UTC (permalink / raw)
To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
> Hi
>
> Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
> > 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
> > > Blend modes are now required to expose pixel formats w/ alpha.
> > >
> > > As it's the primary plane and blending is explicitly disabled,
> > > just
> > > expose PIXEL_NONE blend mode.
> > Gently ping for reviews.
>
> What do these alpha formats do? Are they a hardware feature? It
> looks
> like they are programmable, but don't differ from XRGB at all.
I think they're for consistency with overlay planes.
Thanks,
Icenowy
>
> Best regards
> Thomas
>
> >
> > Thanks,
> > Icenowy
> >
> > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > ---
> > > drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > index 1f2be41ae496c..8d58682d88ef8 100644
> > > --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > @@ -7,6 +7,7 @@
> > >
> > > #include <drm/drm_atomic.h>
> > > #include <drm/drm_atomic_helper.h>
> > > +#include <drm/drm_blend.h>
> > > #include <drm/drm_crtc.h>
> > > #include <drm/drm_fourcc.h>
> > > #include <drm/drm_framebuffer.h>
> > > @@ -179,5 +180,7 @@ struct drm_plane
> > > *vs_primary_plane_init(struct
> > > drm_device *drm_dev, struct vs_dc
> > >
> > > drm_plane_helper_add(plane,
> > > &vs_primary_plane_helper_funcs);
> > >
> > > + drm_plane_create_blend_mode_property(plane,
> > > +
> > > BIT(DRM_MODE_BLEND_PIXEL_NONE));
> > > return plane;
> > > }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:00 ` Icenowy Zheng
@ 2026-09-10 8:31 ` Thomas Zimmermann
2026-09-10 8:42 ` Icenowy Zheng
2026-09-10 8:45 ` Icenowy Zheng
0 siblings, 2 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 8:31 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
Hi
Am 10.09.26 um 10:00 schrieb Icenowy Zheng:
> 在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
>> Hi
>>
>> Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
>>> 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
>>>> Blend modes are now required to expose pixel formats w/ alpha.
>>>>
>>>> As it's the primary plane and blending is explicitly disabled,
>>>> just
>>>> expose PIXEL_NONE blend mode.
>>> Gently ping for reviews.
>> What do these alpha formats do? Are they a hardware feature? It
>> looks
>> like they are programmable, but don't differ from XRGB at all.
> I think they're for consistency with overlay planes.
But there are no overlay planes in this driver, are there?
What I want to get at is that it might be preferable to remove ARGB
entirely from the primary plane if it does not to serve a purpose. But
if the driver can do something useful with these formats, it might be
worth exposing that instead.
In pl111, we now remove the ARGB foramts because the hardware does not
handle them at all. The situation seems less clear in verisilicon.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> Best regards
>> Thomas
>>
>>> Thanks,
>>> Icenowy
>>>
>>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>>> ---
>>>> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
>>>> 1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>> index 1f2be41ae496c..8d58682d88ef8 100644
>>>> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>> @@ -7,6 +7,7 @@
>>>>
>>>> #include <drm/drm_atomic.h>
>>>> #include <drm/drm_atomic_helper.h>
>>>> +#include <drm/drm_blend.h>
>>>> #include <drm/drm_crtc.h>
>>>> #include <drm/drm_fourcc.h>
>>>> #include <drm/drm_framebuffer.h>
>>>> @@ -179,5 +180,7 @@ struct drm_plane
>>>> *vs_primary_plane_init(struct
>>>> drm_device *drm_dev, struct vs_dc
>>>>
>>>> drm_plane_helper_add(plane,
>>>> &vs_primary_plane_helper_funcs);
>>>>
>>>> + drm_plane_create_blend_mode_property(plane,
>>>> +
>>>> BIT(DRM_MODE_BLEND_PIXEL_NONE));
>>>> return plane;
>>>> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:31 ` Thomas Zimmermann
@ 2026-09-10 8:42 ` Icenowy Zheng
2026-09-10 8:45 ` Icenowy Zheng
1 sibling, 0 replies; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 8:42 UTC (permalink / raw)
To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-10四的 10:31 +0200,Thomas Zimmermann写道:
> Hi
>
> Am 10.09.26 um 10:00 schrieb Icenowy Zheng:
> > 在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
> > > Hi
> > >
> > > Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
> > > > 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
> > > > > Blend modes are now required to expose pixel formats w/
> > > > > alpha.
> > > > >
> > > > > As it's the primary plane and blending is explicitly
> > > > > disabled,
> > > > > just
> > > > > expose PIXEL_NONE blend mode.
> > > > Gently ping for reviews.
> > > What do these alpha formats do? Are they a hardware feature? It
> > > looks
> > > like they are programmable, but don't differ from XRGB at all.
> > I think they're for consistency with overlay planes.
>
> But there are no overlay planes in this driver, are there?
>
> What I want to get at is that it might be preferable to remove ARGB
> entirely from the primary plane if it does not to serve a purpose.
> But
> if the driver can do something useful with these formats, it might be
> worth exposing that instead.
The device has overlay planes, but they're currently not supported.
The manual for MA35D1 does list formats with alpha for
DcregFrameBufferConfig0 register, and the hardware can properly handle
these format values (by ignoring the A bits).
Thanks,
Icenowy
>
> In pl111, we now remove the ARGB foramts because the hardware does
> not
> handle them at all. The situation seems less clear in verisilicon.
>
> Best regards
> Thomas
>
>
> >
> > Thanks,
> > Icenowy
> >
> > > Best regards
> > > Thomas
> > >
> > > > Thanks,
> > > > Icenowy
> > > >
> > > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > > ---
> > > > > drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> > > > > 1 file changed, 3 insertions(+)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > index 1f2be41ae496c..8d58682d88ef8 100644
> > > > > --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > @@ -7,6 +7,7 @@
> > > > >
> > > > > #include <drm/drm_atomic.h>
> > > > > #include <drm/drm_atomic_helper.h>
> > > > > +#include <drm/drm_blend.h>
> > > > > #include <drm/drm_crtc.h>
> > > > > #include <drm/drm_fourcc.h>
> > > > > #include <drm/drm_framebuffer.h>
> > > > > @@ -179,5 +180,7 @@ struct drm_plane
> > > > > *vs_primary_plane_init(struct
> > > > > drm_device *drm_dev, struct vs_dc
> > > > >
> > > > > drm_plane_helper_add(plane,
> > > > > &vs_primary_plane_helper_funcs);
> > > > >
> > > > > + drm_plane_create_blend_mode_property(plane,
> > > > > +
> > > > > BIT(DRM_MODE_BLEND_PIXEL_NONE));
> > > > > return plane;
> > > > > }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:31 ` Thomas Zimmermann
2026-09-10 8:42 ` Icenowy Zheng
@ 2026-09-10 8:45 ` Icenowy Zheng
2026-09-10 8:56 ` Thomas Zimmermann
1 sibling, 1 reply; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 8:45 UTC (permalink / raw)
To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-10四的 10:31 +0200,Thomas Zimmermann写道:
> Hi
>
> Am 10.09.26 um 10:00 schrieb Icenowy Zheng:
> > 在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
> > > Hi
> > >
> > > Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
> > > > 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
> > > > > Blend modes are now required to expose pixel formats w/
> > > > > alpha.
> > > > >
> > > > > As it's the primary plane and blending is explicitly
> > > > > disabled,
> > > > > just
> > > > > expose PIXEL_NONE blend mode.
> > > > Gently ping for reviews.
> > > What do these alpha formats do? Are they a hardware feature? It
> > > looks
> > > like they are programmable, but don't differ from XRGB at all.
> > I think they're for consistency with overlay planes.
>
> But there are no overlay planes in this driver, are there?
>
> What I want to get at is that it might be preferable to remove ARGB
> entirely from the primary plane if it does not to serve a purpose.
> But
> if the driver can do something useful with these formats, it might be
> worth exposing that instead.
On DC8000 display controllers (support for them is WIP by Joey Lu)
there seem to be no way to control the blend behavior of the primary
plane.
On DC8200 display controllers the primary plane does have a blending
register, although it seems to be blending with pure black.
Maybe it's viable to just remove the ARGB formats now, and re-introduce
them when overlays are being implemented (and only expose them for the
overlay)?
Thanks,
Icenowy
>
> In pl111, we now remove the ARGB foramts because the hardware does
> not
> handle them at all. The situation seems less clear in verisilicon.
>
> Best regards
> Thomas
>
>
> >
> > Thanks,
> > Icenowy
> >
> > > Best regards
> > > Thomas
> > >
> > > > Thanks,
> > > > Icenowy
> > > >
> > > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > > ---
> > > > > drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> > > > > 1 file changed, 3 insertions(+)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > index 1f2be41ae496c..8d58682d88ef8 100644
> > > > > --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > @@ -7,6 +7,7 @@
> > > > >
> > > > > #include <drm/drm_atomic.h>
> > > > > #include <drm/drm_atomic_helper.h>
> > > > > +#include <drm/drm_blend.h>
> > > > > #include <drm/drm_crtc.h>
> > > > > #include <drm/drm_fourcc.h>
> > > > > #include <drm/drm_framebuffer.h>
> > > > > @@ -179,5 +180,7 @@ struct drm_plane
> > > > > *vs_primary_plane_init(struct
> > > > > drm_device *drm_dev, struct vs_dc
> > > > >
> > > > > drm_plane_helper_add(plane,
> > > > > &vs_primary_plane_helper_funcs);
> > > > >
> > > > > + drm_plane_create_blend_mode_property(plane,
> > > > > +
> > > > > BIT(DRM_MODE_BLEND_PIXEL_NONE));
> > > > > return plane;
> > > > > }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:45 ` Icenowy Zheng
@ 2026-09-10 8:56 ` Thomas Zimmermann
2026-09-10 9:02 ` Icenowy Zheng
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 8:56 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
Hi
Am 10.09.26 um 10:45 schrieb Icenowy Zheng:
> 在 2026-09-10四的 10:31 +0200,Thomas Zimmermann写道:
>> Hi
>>
>> Am 10.09.26 um 10:00 schrieb Icenowy Zheng:
>>> 在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
>>>> Hi
>>>>
>>>> Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
>>>>> 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
>>>>>> Blend modes are now required to expose pixel formats w/
>>>>>> alpha.
>>>>>>
>>>>>> As it's the primary plane and blending is explicitly
>>>>>> disabled,
>>>>>> just
>>>>>> expose PIXEL_NONE blend mode.
>>>>> Gently ping for reviews.
>>>> What do these alpha formats do? Are they a hardware feature? It
>>>> looks
>>>> like they are programmable, but don't differ from XRGB at all.
>>> I think they're for consistency with overlay planes.
>> But there are no overlay planes in this driver, are there?
>>
>> What I want to get at is that it might be preferable to remove ARGB
>> entirely from the primary plane if it does not to serve a purpose.
>> But
>> if the driver can do something useful with these formats, it might be
>> worth exposing that instead.
> On DC8000 display controllers (support for them is WIP by Joey Lu)
> there seem to be no way to control the blend behavior of the primary
> plane.
>
> On DC8200 display controllers the primary plane does have a blending
> register, although it seems to be blending with pure black.
IIRC there's a background-color property for the CRTC. So it might be
possible to expose this as read-only property. (Not sure.)
>
> Maybe it's viable to just remove the ARGB formats now, and re-introduce
> them when overlays are being implemented (and only expose them for the
> overlay)?
I see. Thanks for digging through this. I've meanwhile acked the patches
as there's at least some support in hardware.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> In pl111, we now remove the ARGB foramts because the hardware does
>> not
>> handle them at all. The situation seems less clear in verisilicon.
>>
>> Best regards
>> Thomas
>>
>>
>>> Thanks,
>>> Icenowy
>>>
>>>> Best regards
>>>> Thomas
>>>>
>>>>> Thanks,
>>>>> Icenowy
>>>>>
>>>>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>>>>> ---
>>>>>> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
>>>>>> 1 file changed, 3 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>> index 1f2be41ae496c..8d58682d88ef8 100644
>>>>>> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>> @@ -7,6 +7,7 @@
>>>>>>
>>>>>> #include <drm/drm_atomic.h>
>>>>>> #include <drm/drm_atomic_helper.h>
>>>>>> +#include <drm/drm_blend.h>
>>>>>> #include <drm/drm_crtc.h>
>>>>>> #include <drm/drm_fourcc.h>
>>>>>> #include <drm/drm_framebuffer.h>
>>>>>> @@ -179,5 +180,7 @@ struct drm_plane
>>>>>> *vs_primary_plane_init(struct
>>>>>> drm_device *drm_dev, struct vs_dc
>>>>>>
>>>>>> drm_plane_helper_add(plane,
>>>>>> &vs_primary_plane_helper_funcs);
>>>>>>
>>>>>> + drm_plane_create_blend_mode_property(plane,
>>>>>> +
>>>>>> BIT(DRM_MODE_BLEND_PIXEL_NONE));
>>>>>> return plane;
>>>>>> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:56 ` Thomas Zimmermann
@ 2026-09-10 9:02 ` Icenowy Zheng
2026-09-10 9:11 ` Thomas Zimmermann
0 siblings, 1 reply; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 9:02 UTC (permalink / raw)
To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-10四的 10:56 +0200,Thomas Zimmermann写道:
> Hi
>
> Am 10.09.26 um 10:45 schrieb Icenowy Zheng:
> > 在 2026-09-10四的 10:31 +0200,Thomas Zimmermann写道:
> > > Hi
> > >
> > > Am 10.09.26 um 10:00 schrieb Icenowy Zheng:
> > > > 在 2026-09-10四的 09:58 +0200,Thomas Zimmermann写道:
> > > > > Hi
> > > > >
> > > > > Am 10.09.26 um 09:09 schrieb Icenowy Zheng:
> > > > > > 在 2026-09-02三的 01:17 +0800,Icenowy Zheng写道:
> > > > > > > Blend modes are now required to expose pixel formats w/
> > > > > > > alpha.
> > > > > > >
> > > > > > > As it's the primary plane and blending is explicitly
> > > > > > > disabled,
> > > > > > > just
> > > > > > > expose PIXEL_NONE blend mode.
> > > > > > Gently ping for reviews.
> > > > > What do these alpha formats do? Are they a hardware
> > > > > feature? It
> > > > > looks
> > > > > like they are programmable, but don't differ from XRGB at
> > > > > all.
> > > > I think they're for consistency with overlay planes.
> > > But there are no overlay planes in this driver, are there?
> > >
> > > What I want to get at is that it might be preferable to remove
> > > ARGB
> > > entirely from the primary plane if it does not to serve a
> > > purpose.
> > > But
> > > if the driver can do something useful with these formats, it
> > > might be
> > > worth exposing that instead.
> > On DC8000 display controllers (support for them is WIP by Joey Lu)
> > there seem to be no way to control the blend behavior of the
> > primary
> > plane.
> >
> > On DC8200 display controllers the primary plane does have a
> > blending
> > register, although it seems to be blending with pure black.
>
> IIRC there's a background-color property for the CRTC. So it might
> be
> possible to expose this as read-only property. (Not sure.)
The hardware has a "background color" per plane, but it seems that this
is only for the colorkey (punching out special color values) feature,
not for alpha blending.
>
> >
> > Maybe it's viable to just remove the ARGB formats now, and re-
> > introduce
> > them when overlays are being implemented (and only expose them for
> > the
> > overlay)?
>
> I see. Thanks for digging through this. I've meanwhile acked the
> patches
> as there's at least some support in hardware.
As the DC8000 support is being developed (a new revision of that
patchset just appeared on this Tuesday), and on that hardware the A
channel has no meaning except for being ignored (no blend configuration
register for the primary plane), maybe I still need to remove alpha
formats (at least for DC8000)?
Although in such case, when the overlay support is going to be
introduced, two format tables need to be present -- one with alpha and
one without.
Thanks,
Icenowy
>
> Best regards
> Thomas
>
>
> >
> > Thanks,
> > Icenowy
> >
> > > In pl111, we now remove the ARGB foramts because the hardware
> > > does
> > > not
> > > handle them at all. The situation seems less clear in
> > > verisilicon.
> > >
> > > Best regards
> > > Thomas
> > >
> > >
> > > > Thanks,
> > > > Icenowy
> > > >
> > > > > Best regards
> > > > > Thomas
> > > > >
> > > > > > Thanks,
> > > > > > Icenowy
> > > > > >
> > > > > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > > > > ---
> > > > > > > drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3
> > > > > > > +++
> > > > > > > 1 file changed, 3 insertions(+)
> > > > > > >
> > > > > > > diff --git
> > > > > > > a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > > > b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > > > index 1f2be41ae496c..8d58682d88ef8 100644
> > > > > > > --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > > > +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > > > > > > @@ -7,6 +7,7 @@
> > > > > > >
> > > > > > > #include <drm/drm_atomic.h>
> > > > > > > #include <drm/drm_atomic_helper.h>
> > > > > > > +#include <drm/drm_blend.h>
> > > > > > > #include <drm/drm_crtc.h>
> > > > > > > #include <drm/drm_fourcc.h>
> > > > > > > #include <drm/drm_framebuffer.h>
> > > > > > > @@ -179,5 +180,7 @@ struct drm_plane
> > > > > > > *vs_primary_plane_init(struct
> > > > > > > drm_device *drm_dev, struct vs_dc
> > > > > > >
> > > > > > > drm_plane_helper_add(plane,
> > > > > > > &vs_primary_plane_helper_funcs);
> > > > > > >
> > > > > > > + drm_plane_create_blend_mode_property(plane,
> > > > > > > +
> > > > > > > BIT(DRM_MODE_BLEND_PIXEL_NONE));
> > > > > > > return plane;
> > > > > > > }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 9:02 ` Icenowy Zheng
@ 2026-09-10 9:11 ` Thomas Zimmermann
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 9:11 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
Hi
Am 10.09.26 um 11:02 schrieb Icenowy Zheng:
[...]
> As the DC8000 support is being developed (a new revision of that
> patchset just appeared on this Tuesday), and on that hardware the A
> channel has no meaning except for being ignored (no blend configuration
> register for the primary plane), maybe I still need to remove alpha
> formats (at least for DC8000)?
>
> Although in such case, when the overlay support is going to be
> introduced, two format tables need to be present -- one with alpha and
> one without.
Sure. In my opinion, there should be a dedicated format table for each
type of plane. These "super tables" that sometimes try to catch all
cases in a single place are not great.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> Best regards
>> Thomas
>>
>>
>>> Thanks,
>>> Icenowy
>>>
>>>> In pl111, we now remove the ARGB foramts because the hardware
>>>> does
>>>> not
>>>> handle them at all. The situation seems less clear in
>>>> verisilicon.
>>>>
>>>> Best regards
>>>> Thomas
>>>>
>>>>
>>>>> Thanks,
>>>>> Icenowy
>>>>>
>>>>>> Best regards
>>>>>> Thomas
>>>>>>
>>>>>>> Thanks,
>>>>>>> Icenowy
>>>>>>>
>>>>>>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>>>>>>> ---
>>>>>>>> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3
>>>>>>>> +++
>>>>>>>> 1 file changed, 3 insertions(+)
>>>>>>>>
>>>>>>>> diff --git
>>>>>>>> a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>>>> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>>>> index 1f2be41ae496c..8d58682d88ef8 100644
>>>>>>>> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>>>> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>>>>>>> @@ -7,6 +7,7 @@
>>>>>>>>
>>>>>>>> #include <drm/drm_atomic.h>
>>>>>>>> #include <drm/drm_atomic_helper.h>
>>>>>>>> +#include <drm/drm_blend.h>
>>>>>>>> #include <drm/drm_crtc.h>
>>>>>>>> #include <drm/drm_fourcc.h>
>>>>>>>> #include <drm/drm_framebuffer.h>
>>>>>>>> @@ -179,5 +180,7 @@ struct drm_plane
>>>>>>>> *vs_primary_plane_init(struct
>>>>>>>> drm_device *drm_dev, struct vs_dc
>>>>>>>>
>>>>>>>> drm_plane_helper_add(plane,
>>>>>>>> &vs_primary_plane_helper_funcs);
>>>>>>>>
>>>>>>>> + drm_plane_create_blend_mode_property(plane,
>>>>>>>> +
>>>>>>>> BIT(DRM_MODE_BLEND_PIXEL_NONE));
>>>>>>>> return plane;
>>>>>>>> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-01 17:17 [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane Icenowy Zheng
` (2 preceding siblings ...)
2026-09-10 7:09 ` Icenowy Zheng
@ 2026-09-10 8:49 ` Thomas Zimmermann
2026-09-10 9:08 ` Icenowy Zheng
3 siblings, 1 reply; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 8:49 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
Icenowy Zheng
Am 01.09.26 um 19:17 schrieb Icenowy Zheng:
> Blend modes are now required to expose pixel formats w/ alpha.
>
> As it's the primary plane and blending is explicitly disabled, just
> expose PIXEL_NONE blend mode.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> index 1f2be41ae496c..8d58682d88ef8 100644
> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> @@ -7,6 +7,7 @@
>
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_blend.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_fourcc.h>
> #include <drm/drm_framebuffer.h>
> @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct drm_device *drm_dev, struct vs_dc
>
> drm_plane_helper_add(plane, &vs_primary_plane_helper_funcs);
>
> + drm_plane_create_blend_mode_property(plane,
> + BIT(DRM_MODE_BLEND_PIXEL_NONE));
No empty line before that call. I think it also fits onto a single line.
Apart from the style
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> return plane;
> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 8:49 ` Thomas Zimmermann
@ 2026-09-10 9:08 ` Icenowy Zheng
2026-09-10 10:39 ` Thomas Zimmermann
0 siblings, 1 reply; 17+ messages in thread
From: Icenowy Zheng @ 2026-09-10 9:08 UTC (permalink / raw)
To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
在 2026-09-10四的 10:49 +0200,Thomas Zimmermann写道:
>
>
> Am 01.09.26 um 19:17 schrieb Icenowy Zheng:
> > Blend modes are now required to expose pixel formats w/ alpha.
> >
> > As it's the primary plane and blending is explicitly disabled, just
> > expose PIXEL_NONE blend mode.
> >
> > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > ---
> > drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > index 1f2be41ae496c..8d58682d88ef8 100644
> > --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> > @@ -7,6 +7,7 @@
> >
> > #include <drm/drm_atomic.h>
> > #include <drm/drm_atomic_helper.h>
> > +#include <drm/drm_blend.h>
> > #include <drm/drm_crtc.h>
> > #include <drm/drm_fourcc.h>
> > #include <drm/drm_framebuffer.h>
> > @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct
> > drm_device *drm_dev, struct vs_dc
> >
> > drm_plane_helper_add(plane,
> > &vs_primary_plane_helper_funcs);
> >
> > + drm_plane_create_blend_mode_property(plane,
> > +
> > BIT(DRM_MODE_BLEND_PIXEL_NONE));
>
> No empty line before that call. I think it also fits onto a single
The plane blend mode call exceeds 80 columns (82 columns for COVERAGE
and 83 columns for PIXEL_NONE), although I heard that sometimes the
limit is 100 columns instead (but coding-style.rst still says 80
columns is preferred).
Thanks,
Icenowy
> line.
> Apart from the style
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
>
> > return plane;
> > }
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/verisilicon: set blend mode for the primary plane
2026-09-10 9:08 ` Icenowy Zheng
@ 2026-09-10 10:39 ` Thomas Zimmermann
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 10:39 UTC (permalink / raw)
To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel
Hi
Am 10.09.26 um 11:08 schrieb Icenowy Zheng:
> 在 2026-09-10四的 10:49 +0200,Thomas Zimmermann写道:
>>
>> Am 01.09.26 um 19:17 schrieb Icenowy Zheng:
>>> Blend modes are now required to expose pixel formats w/ alpha.
>>>
>>> As it's the primary plane and blending is explicitly disabled, just
>>> expose PIXEL_NONE blend mode.
>>>
>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>> ---
>>> drivers/gpu/drm/verisilicon/vs_primary_plane.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>> index 1f2be41ae496c..8d58682d88ef8 100644
>>> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
>>> @@ -7,6 +7,7 @@
>>>
>>> #include <drm/drm_atomic.h>
>>> #include <drm/drm_atomic_helper.h>
>>> +#include <drm/drm_blend.h>
>>> #include <drm/drm_crtc.h>
>>> #include <drm/drm_fourcc.h>
>>> #include <drm/drm_framebuffer.h>
>>> @@ -179,5 +180,7 @@ struct drm_plane *vs_primary_plane_init(struct
>>> drm_device *drm_dev, struct vs_dc
>>>
>>> drm_plane_helper_add(plane,
>>> &vs_primary_plane_helper_funcs);
>>>
>>> + drm_plane_create_blend_mode_property(plane,
>>> +
>>> BIT(DRM_MODE_BLEND_PIXEL_NONE));
>> No empty line before that call. I think it also fits onto a single
> The plane blend mode call exceeds 80 columns (82 columns for COVERAGE
> and 83 columns for PIXEL_NONE), although I heard that sometimes the
> limit is 100 columns instead (but coding-style.rst still says 80
> columns is preferred).
It's 100 characters now.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> line.
>> Apart from the style
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>
>>
>>> return plane;
>>> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 17+ messages in thread