diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c index dfa1ba45acd9..15a322422f4e 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c @@ -930,13 +930,6 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev, ret = drm_plane_create_alpha_property(&wndw->plane); if (ret) return ret; - - ret = drm_plane_create_blend_mode_property(&wndw->plane, - BIT(DRM_MODE_BLEND_PIXEL_NONE) | - BIT(DRM_MODE_BLEND_PREMULTI) | - BIT(DRM_MODE_BLEND_COVERAGE)); - if (ret) - return ret; } else { ret = drm_plane_create_zpos_immutable_property(&wndw->plane, nv50_wndw_zpos_default(&wndw->plane)); @@ -944,6 +937,17 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev, return ret; } + /* + * DRM requires that we have a blend mode property for any type of plane that exposes color + * formats with an alpha channel. So do this, even if we don't actually have control for the + * blend property hooked up with blend_set. + */ + if (func->blend_modes) { + ret = drm_plane_create_blend_mode_property(&wndw->plane, func->blend_modes); + if (ret) + return ret; + } + return 0; }