2024-04-02 07:54:15

by Wojciech Macek

[permalink] [raw]
Subject: [PATCH] drm/mediatek: Add RENDER capability to DRM device

DRM device shall create /dev/dri/renderXXX entry
to allow ChromeOS VMs to access the OpenGL rendering
offload.

Signed-off-by: Wojciech Macek <[email protected]>
---
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 74832c213092..afa4d6391b08 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -585,7 +585,8 @@ static struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,
}

static const struct drm_driver mtk_drm_driver = {
- .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
+ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC |
+ DRIVER_RENDER,

.dumb_create = mtk_drm_gem_dumb_create,

--
2.44.0.478.gd926399ef9-goog



2024-04-08 10:00:21

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH] drm/mediatek: Add RENDER capability to DRM device

Hi, Wojciech:

On Tue, 2024-04-02 at 07:53 +0000, Wojciech Macek wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> DRM device shall create /dev/dri/renderXXX entry
> to allow ChromeOS VMs to access the OpenGL rendering
> offload.

I think this is the case Daniel mention in [1]. If so, this should not
upstream.

[1]
https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/

Regards,
CK

>
> Signed-off-by: Wojciech Macek <[email protected]>
> ---
> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index 74832c213092..afa4d6391b08 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -585,7 +585,8 @@ static struct drm_gem_object
> *mtk_drm_gem_prime_import(struct drm_device *dev,
> }
>
> static const struct drm_driver mtk_drm_driver = {
> - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
> + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC
> |
> + DRIVER_RENDER,
>
> .dumb_create = mtk_drm_gem_dumb_create,
>
> --
> 2.44.0.478.gd926399ef9-goog
>