Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-08 Thread Greg Kroah-Hartman
On Sat, Feb 08, 2025 at 09:37:56AM +0100, Louis Chauvet wrote: > On 08/02/25 - 08:12, Greg Kroah-Hartman wrote: > > On Fri, Feb 07, 2025 at 05:59:04PM +0100, Louis Chauvet wrote: > > > On 06/02/25 - 18:38, Greg Kroah-Hartman wrote: > > > > The vkms driver does not ne

Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-08 Thread Louis Chauvet
On 08/02/25 - 08:12, Greg Kroah-Hartman wrote: > On Fri, Feb 07, 2025 at 05:59:04PM +0100, Louis Chauvet wrote: > > On 06/02/25 - 18:38, Greg Kroah-Hartman wrote: > > > The vkms driver does not need to create a platform device, as there is > > > no real platform resour

Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-07 Thread Greg Kroah-Hartman
On Fri, Feb 07, 2025 at 05:59:04PM +0100, Louis Chauvet wrote: > On 06/02/25 - 18:38, Greg Kroah-Hartman wrote: > > The vkms driver does not need to create a platform device, as there is > > no real platform resources associated it, it only did so because it was > > simple t

Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-07 Thread Louis Chauvet
On 06/02/25 - 18:38, Greg Kroah-Hartman wrote: > The vkms driver does not need to create a platform device, as there is > no real platform resources associated it, it only did so because it was > simple to do that in order to get a device to use for resource > management of drm resour

Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-07 Thread Greg Kroah-Hartman
On Thu, Feb 06, 2025 at 03:03:41PM -0500, Lyude Paul wrote: > Lol, I wrote up a patch for this last night but it looks like you got here > first :P > > On Thu, 2025-02-06 at 18:38 +0100, Greg Kroah-Hartman wrote: > > The vkms driver does not need to create a platform device,

Re: [PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-06 Thread Lyude Paul
Lol, I wrote up a patch for this last night but it looks like you got here first :P On Thu, 2025-02-06 at 18:38 +0100, Greg Kroah-Hartman wrote: > The vkms driver does not need to create a platform device, as there is > no real platform resources associated it, it only did so because

[PATCH v3 8/8] drm/vkms: convert to use faux_device

2025-02-06 Thread Greg Kroah-Hartman
The vkms driver does not need to create a platform device, as there is no real platform resources associated it, it only did so because it was simple to do that in order to get a device to use for resource management of drm resources. Change the driver to use the faux device instead as this is

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-02-05 Thread Louis Chauvet
On 05/02/25 - 09:55, Maxime Ripard wrote: > On Mon, Jan 27, 2025 at 11:48:23AM +0100, Louis Chauvet wrote: > > On 26/01/25 - 18:06, Maxime Ripard wrote: > > > On Tue, Jan 21, 2025 at 11:48:06AM +0100, Louis Chauvet wrote: > > > > +static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-02-05 Thread Maxime Ripard
On Mon, Jan 27, 2025 at 11:48:23AM +0100, Louis Chauvet wrote: > On 26/01/25 - 18:06, Maxime Ripard wrote: > > On Tue, Jan 21, 2025 at 11:48:06AM +0100, Louis Chauvet wrote: > > > +static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > > > + /* > > > + * colour.RGB_to_YCbCr(, > > >

[PATCH v17 0/7] drm/vkms: Add support for YUV and DRM_FORMAT_R*

2025-02-04 Thread Louis Chauvet
g/all/202410110407.ehvadsaf-...@intel.com/ - Export required symbols in DRM core to use them in kunit - Update the kunit comments according to Maxime's feedback - Link to original series: https://lore.kernel.org/r/20241007-yuv-v12-0-01c1ada6f...@bootlin.com --- Arthur Grillo (5): drm

[PATCH v17 7/7] drm/vkms: Add support for DRM_FORMAT_R*

2025-02-04 Thread Louis Chauvet
-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 +++- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH v17 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-02-04 Thread Louis Chauvet
) - change expected alpha from 0x to 0x - adapt to the new get_conversion_matrix usage - apply the changes from Arthur - move struct pixel_yuv_u8 to the test itself] Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/Kconfig

[PATCH v17 6/7] drm/vkms: Add how to run the Kunit tests

2025-02-04 Thread Louis Chauvet
entire test:: sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms" sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip +Testing With KUnit +== + +KUnit

[PATCH v17 3/7] drm/vkms: Drop YUV formats TODO

2025-02-04 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v17 2/7] drm/vkms: Add range and encoding properties to the plane

2025-02-04 Thread Louis Chauvet
: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index 6388928412f61debd88685679e8ee35072691d69..fbfbe424e558d781759c25a46e3b2b4ab082558c 100644 --- a/drivers/gpu

[PATCH v17 1/7] drm/vkms: Add YUV support

2025-02-04 Thread Louis Chauvet
whole conversion_matrix in the plane state - remove struct pixel_yuv_u8 - update the commit message - Merge the modifications from Arthur] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 18 ++ drivers/gpu/drm/vkms/vkms_formats.c | 354 drivers/gpu/drm

Re: [PATCH v2] drm/vkms: Add support for ABGR8888 pixel format

2025-02-04 Thread Louis Chauvet
On 29/01/25 - 14:20, Paz Zcharya wrote: > From: Paz Zcharya > > Add support for pixel format ABGR, which is the default format > on Android devices. This will allow us to use VKMS as the default > display driver in Android Emulator (Cuttlefish) and increase VKMS > adoptio

Re: [PATCH 00/13] drm/vkms: Allow to configure device

2025-01-31 Thread José Expósito
> > > In preparation for ConfigFS support, a flexible way to configure VKMS > > > > device(s) > > > > is required. > > > > This series adds the required APIs to create a configuration, the code > > > > changes > > > > required

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-01-31 Thread José Expósito
; > > + { "gray", { 0x80, 0x80, 0x80 }, { 0x, 0x8080, > > > 0x8080, 0x8080 }}, > > > + { "black", { 0x00, 0x80, 0x80 }, { 0x, 0x, > > > 0x, 0x }}, > > > + { "

Re: [PATCH v16 3/7] drm/vkms: Drop YUV formats TODO

2025-01-31 Thread José Expósito
t; > documentation before reviewing this series... But I'll most likely ask some > > basic/dump questions. > > > > > From: Arthur Grillo > > > > > > VKMS has support for YUV formats now. Remove the task from the TODO > > > list. > >

Re: [PATCH v16 3/7] drm/vkms: Drop YUV formats TODO

2025-01-31 Thread Louis Chauvet
questions. > > > From: Arthur Grillo > > > > VKMS has support for YUV formats now. Remove the task from the TODO > > list. > > > > Signed-off-by: Arthur Grillo > > Signed-off-by: Louis Chauvet > > --- > > Documentation/gpu/vkms.rst | 3 +--

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-01-31 Thread Louis Chauvet
, { 0x, 0x, > > 0x, 0x }}, > > + { "red", { 0x36, 0x63, 0xff }, { 0x, 0x, > > 0x, 0x }}, > > + { "green", { 0xb6, 0x1e, 0x0c }, { 0x, 0x, > > 0x, 0x }}, > > + { "blue", { 0x12, 0xff, 0x74 }, { 0x, 0x000

Re: [PATCH 00/13] drm/vkms: Allow to configure device

2025-01-31 Thread Louis Chauvet
On 31/01/25 - 10:31, José Expósito wrote: > On Thu, Jan 30, 2025 at 02:48:10PM +0100, Louis Chauvet wrote: > > On 29/01/25 - 12:00, José Expósito wrote: > > > Hi everyone, > > > > > > In preparation for ConfigFS support, a flexible way to configure VKM

Re: [PATCH 00/13] drm/vkms: Allow to configure device

2025-01-31 Thread José Expósito
On Thu, Jan 30, 2025 at 02:48:10PM +0100, Louis Chauvet wrote: > On 29/01/25 - 12:00, José Expósito wrote: > > Hi everyone, > > > > In preparation for ConfigFS support, a flexible way to configure VKMS > > device(s) > > is required. > > This se

[PATCH v16 6/7] drm/vkms: Add how to run the Kunit tests

2025-01-31 Thread José Expósito
ef5ef2e6a210382a070eaf3552bbce75b04ff0c > 100644 > --- a/Documentation/gpu/vkms.rst > +++ b/Documentation/gpu/vkms.rst > @@ -89,6 +89,17 @@ You can also run subtests if you do not want to run the > entire test:: >sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device >

[PATCH v16 3/7] drm/vkms: Drop YUV formats TODO

2025-01-31 Thread José Expósito
Hi Louis, Thanks a lot for the patches. I'm not well versed in YUV color formats, so I did my best reading the kernel documentation before reviewing this series... But I'll most likely ask some basic/dump questions. > From: Arthur Grillo > > VKMS has support for YUV form

Re: [PATCH v2] drm/vkms: Add support for ABGR8888 pixel format

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 14:20, Paz Zcharya wrote: > From: Paz Zcharya > > Add support for pixel format ABGR, which is the default format > on Android devices. This will allow us to use VKMS as the default > display driver in Android Emulator (Cuttlefish) and increase VKMS > adoptio

Re: [PATCH 09/13] drm/vkms: Allow to attach planes and CRTCs

2025-01-30 Thread Louis Chauvet
gure the output following the configuration. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/vkms_config.c > b/driv

Re: [PATCH 08/13] drm/vkms: Allow to configure multiple CRTCs

2025-01-30 Thread Louis Chauvet
CRTCs, but for the > moment there are no changes in the way the output is configured. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/v

Re: [PATCH 13/13] drm/vkms: Allow to attach connectors and encoders

2025-01-30 Thread Louis Chauvet
> > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito > --- > drivers/gpu/drm/vkms/tests/vkms_config_test.c | 62 +++++ > drivers/gpu/drm/v

Re: [PATCH 06/13] drm/vkms: Add a validation function for VKMS configuration

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > From: Louis Chauvet > > As the configuration will be used by userspace, add a validator to avoid > creating a broken DRM device. > > For the moment, the function always returns true, but rules will be > added in future patches. > > Signed-off-by: José

Re: [PATCH 02/13] drm/vkms: Add KUnit test scaffolding

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add the required boilerplate to start creating KUnit test. > > To run the tests: > > $ ./tools/testing/kunit/kunit.py run \ > --kunitconfig=drivers/gpu/drm/vkms/tests > > Signed-off-by: Arthur Grillo > Signed-off-

Re: [PATCH 07/13] drm/vkms: Allow to configure multiple planes

2025-01-30 Thread Louis Chauvet
to the default > configuration. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_test.c > b/drivers/gpu/

Re: [PATCH 10/13] drm/vkms: Allow to configure multiple encoders

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of encoders to vkms_config and helper functions to add and > remove as many encoders as wanted. > > For backwards compatibility, add one encoder to the default > configuration. > > A future patch will allow to attach encoders and CRTCs, but f

Re: [PATCH 12/13] drm/vkms: Allow to configure multiple connectors

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of connectors to vkms_config and helper functions to add and > remove as many connectors as wanted. > > Unlike planes, CRTCs and encoders, connectors can be added and removed > once the device is created. To reflect it, add an "enabled" flag i

Re: [PATCH 11/13] drm/vkms: Allow to attach encoders and CRTCs

2025-01-30 Thread Louis Chauvet
; > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_test.c > b/drivers/gpu/drm/vkms/tests/vkms_config_test.c [..

Re: [PATCH 04/13] drm/vkms: Move default_config creation to its own function

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Extract the initialization of the default configuration to a function. > Refactor, no functional changes. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: Jos

Re: [PATCH 05/13] drm/vkms: Set device name from vkms_config

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > In order to be able to create multiple devices, the device name needs to > be unique. > > Allow to set it in the VKMS configuration. > > Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_te

Re: [PATCH 03/13] drm/vkms: Extract vkms_config header

2025-01-30 Thread Louis Chauvet
alize > debugfs. > > Refactor, no functional changes. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers

Re: [PATCH 00/13] drm/vkms: Allow to configure device

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Hi everyone, > > In preparation for ConfigFS support, a flexible way to configure VKMS > device(s) > is required. > This series adds the required APIs to create a configuration, the code changes > required to apply it and KUni

Re: [PATCH 01/13] drm/vkms: Extract vkms_connector header

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Up until now, the logic to manage connectors was in vkms_output.c. > > Since more options will be added to connectors in the future, extract > the code to its own file. > > Refactor, no functional changes. > > Signed-off-by: José Expósito Non blockin

Re: [PATCH] drm/vkms: Add support for ABGR8888 pixel format

2025-01-29 Thread Paz Zcharya
On Wed, Jan 29, 2025 at 11:18:26AM +0100, Louis Chauvet wrote: > And I just noticed that "changes in v2" is in the commit log. It should > not be there. > > To add a changelog, you must put it after ---, so in your case your commit > should be something like: > &

[PATCH v2] drm/vkms: Add support for ABGR8888 pixel format

2025-01-29 Thread Paz Zcharya
From: Paz Zcharya Add support for pixel format ABGR, which is the default format on Android devices. This will allow us to use VKMS as the default display driver in Android Emulator (Cuttlefish) and increase VKMS adoption. Signed-off-by: Paz Zcharya --- Changes in v2: - Rebased on top of

[PATCH 01/13] drm/vkms: Extract vkms_connector header

2025-01-29 Thread José Expósito
Up until now, the logic to manage connectors was in vkms_output.c. Since more options will be added to connectors in the future, extract the code to its own file. Refactor, no functional changes. Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/Makefile | 3 +- drivers/gpu/drm

[PATCH 11/13] drm/vkms: Allow to attach encoders and CRTCs

2025-01-29 Thread José Expósito
--- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 112 ++ drivers/gpu/drm/vkms/vkms_config.c| 106 + drivers/gpu/drm/vkms/vkms_config.h| 33 ++ drivers/gpu/drm/vkms/vkms_output.c| 64 +++--- 4 files changed, 299 insertions

[PATCH 04/13] drm/vkms: Move default_config creation to its own function

2025-01-29 Thread José Expósito
Extract the initialization of the default configuration to a function. Refactor, no functional changes. Signed-off-by: Louis Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 38 +++ drivers/gpu/drm/vkms/vkms_config.c| 17

[PATCH 08/13] drm/vkms: Allow to configure multiple CRTCs

2025-01-29 Thread José Expósito
configured. Signed-off-by: Louis Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 72 +++- drivers/gpu/drm/vkms/vkms_config.c| 86 ++- drivers/gpu/drm/vkms/vkms_config.h| 83 ++ drivers/gpu/drm

[PATCH 06/13] drm/vkms: Add a validation function for VKMS configuration

2025-01-29 Thread José Expósito
/drm/vkms/tests/vkms_config_test.c | 2 ++ drivers/gpu/drm/vkms/vkms_config.c| 5 + drivers/gpu/drm/vkms/vkms_config.h| 10 ++ 3 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_test.c b/drivers/gpu/drm/vkms/tests

[PATCH 12/13] drm/vkms: Allow to configure multiple connectors

2025-01-29 Thread José Expósito
ture patch will allow to attach connectors and encoders, but for the moment there are no changes in the way the output is configured. Signed-off-by: Louis Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 84 + drivers/gpu/drm/vkms/vkm

[PATCH 09/13] drm/vkms: Allow to attach planes and CRTCs

2025-01-29 Thread José Expósito
Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 185 ++ drivers/gpu/drm/vkms/vkms_config.c| 166 ++-- drivers/gpu/drm/vkms/vkms_config.h| 55 +- drivers/gpu/drm/vkms/vkms_output.c| 77

[PATCH 10/13] drm/vkms: Allow to configure multiple encoders

2025-01-29 Thread José Expósito
output is configured. Signed-off-by: Louis Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 65 drivers/gpu/drm/vkms/vkms_config.c| 78 +++ drivers/gpu/drm/vkms/vkms_config.h| 49 3 files

[PATCH 03/13] drm/vkms: Extract vkms_config header

2025-01-29 Thread José Expósito
Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/Makefile | 3 +- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 11 + drivers/gpu/drm/vkms/vkms_config.c| 47 +++ drivers/gpu/drm/vkms/vkms_config.h| 47

[PATCH 00/13] drm/vkms: Allow to configure device

2025-01-29 Thread José Expósito
Hi everyone, In preparation for ConfigFS support, a flexible way to configure VKMS device(s) is required. This series adds the required APIs to create a configuration, the code changes required to apply it and KUnit test validating the changes. Louis Chauvet and I are working on ConfigFS support

[PATCH 13/13] drm/vkms: Allow to attach connectors and encoders

2025-01-29 Thread José Expósito
--- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 62 + drivers/gpu/drm/vkms/vkms_config.c| 69 +++ drivers/gpu/drm/vkms/vkms_config.h| 33 + drivers/gpu/drm/vkms/vkms_output.c| 57 +++ 4 files changed, 209 insertions

[PATCH 07/13] drm/vkms: Allow to configure multiple planes

2025-01-29 Thread José Expósito
-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 133 +++- drivers/gpu/drm/vkms/vkms_config.c| 149 +- drivers/gpu/drm/vkms/vkms_config.h| 78 - drivers/gpu/drm/vkms/vkms_output.c| 67 4 files

[PATCH 05/13] drm/vkms: Set device name from vkms_config

2025-01-29 Thread José Expósito
In order to be able to create multiple devices, the device name needs to be unique. Allow to set it in the VKMS configuration. Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/tests/vkms_config_test.c | 7 ++- drivers/gpu/drm/vkms/vkms_config.c| 14 -- drivers

[PATCH 02/13] drm/vkms: Add KUnit test scaffolding

2025-01-29 Thread José Expósito
Add the required boilerplate to start creating KUnit test. To run the tests: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig=drivers/gpu/drm/vkms/tests Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/Kconfig

Re: [PATCH] drm/vkms: Add support for ABGR8888 pixel format

2025-01-29 Thread Louis Chauvet
On 28/01/25 - 15:08, Paz Zcharya wrote: > On Tue, Jan 28, 2025 at 11:04:33AM +0100, Louis Chauvet wrote: > > On 27/01/25 - 23:59, Paz Zcharya wrote: > > > Add support for pixel format ABGR, which is the default format > > > on Android devices. This will allow us

Re: [PATCH] drm/vkms: Add support for ABGR8888 pixel format

2025-01-28 Thread Paz Zcharya
On Tue, Jan 28, 2025 at 11:04:33AM +0100, Louis Chauvet wrote: > On 27/01/25 - 23:59, Paz Zcharya wrote: > > Add support for pixel format ABGR, which is the default format > > on Android devices. This will allow us to use VKMS as the default > > display driver in Android

Re: [PATCH] drm/vkms: Add support for ABGR8888 pixel format

2025-01-28 Thread Louis Chauvet
On 27/01/25 - 23:59, Paz Zcharya wrote: > Add support for pixel format ABGR, which is the default format > on Android devices. This will allow us to use VKMS as the default > display driver in Android Emulator (Cuttlefish) and increase VKMS > adoption. > > Changes in v2: >

[PATCH] drm/vkms: Add support for ABGR8888 pixel format

2025-01-27 Thread Paz Zcharya
Add support for pixel format ABGR, which is the default format on Android devices. This will allow us to use VKMS as the default display driver in Android Emulator (Cuttlefish) and increase VKMS adoption. Changes in v2: - Rebased on top of tip of tree because it has been 3 months. - No

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-01-27 Thread Louis Chauvet
On 26/01/25 - 18:06, Maxime Ripard wrote: > On Tue, Jan 21, 2025 at 11:48:06AM +0100, Louis Chauvet wrote: > > +static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > > + /* > > +* colour.RGB_to_YCbCr(, > > +* K=colour.WEIGHTS_YCBCR["ITU-R BT.601"], > >

Re: [PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-01-26 Thread Maxime Ripard
On Tue, Jan 21, 2025 at 11:48:06AM +0100, Louis Chauvet wrote: > +static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > + /* > + * colour.RGB_to_YCbCr(, > + * K=colour.WEIGHTS_YCBCR["ITU-R BT.601"], > + * in_bits = 16, > +

[PATCH 57/63] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2025-01-24 Thread Jim Cromie
The vkms driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms

Re: [PATCH v4 3/3] drm/vkms: Switch to dynamic allocation for CRTC

2025-01-21 Thread Louis Chauvet
mplement dynamic configuration of VKMS > > > > (configFS), > > > > it will be easier to have one allocation per CRTC. > > > > > > > > Reviewed-by: Maxime Ripard > > > > Signed-off-by: Louis Chauvet > > > > --- > &g

[PATCH RFC v3 06/14] drm/vkms: Introduce configfs for crtc and encoder

2025-01-21 Thread Louis Chauvet
To allows the userspace to test many hardware configuration, introduce a new interface to configure CRTCs and encoders. The CRTCs and encoders are created in their own directory. To link the CRTC, symlinks are used in the `possible_crtcs` folders. The current interface is: /config/vkms

[PATCH RFC v3 14/14] drm/vkms: Introduce configfs for encoder type

2025-01-21 Thread Louis Chauvet
In order to support multiple configuration, add the possibility to change the encoder type. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 57 1 file changed, 57 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b

[PATCH RFC v3 10/14] drm/vkms: Introduce configfs for device name

2025-01-21 Thread Louis Chauvet
To allows the userspace to identify the device once it is enabled, create a file to fetch it. This file can only be read once the device is enabled, and will return the device name, which can later be used to use it. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 16

[PATCH RFC v3 12/14] drm/vkms: Introduce configfs for connector id

2025-01-21 Thread Louis Chauvet
A connector can't be identified by a name, so add a configfs file to retrieve its id. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b/drivers/gpu/drm

[PATCH RFC v3 08/14] drm/vkms: Introduce configfs for connector type

2025-01-21 Thread Louis Chauvet
To allows the userspace to test many hardware configuration, introduce a new interface to change a connector type. The type of a connector can be changed by editing the file type and by writing the connector type number. The current interface is: /config/vkms DEVICE_1 ┣━ enable

[PATCH RFC v3 07/14] drm/vkms: Introduce configfs for connectors

2025-01-21 Thread Louis Chauvet
directory. The current interface is: /config/vkms DEVICE_1 ┣━ enable ┣━ planes ┃ ┗━ [...] ┣━ connectors ┃ ┗━ CONNECTOR_1 ┃ ┗━ possible_encoders ┃┗━ >> DEVICE_1/encoders/ENCODER_1 ┗━ encoders ┗━ ENC

[PATCH RFC v3 09/14] drm/vkms: Introduce configfs for plane format

2025-01-21 Thread Louis Chauvet
To allows the userspace to test many hardware configuration, introduce a new interface to configure the available formats per planes. VKMS supports many formats, so the userspace can choose any combination of them. The supported formats are configured by writing in the file supported_formats

[PATCH RFC v3 11/14] drm/vkms: Introduce configfs for connector status

2025-01-21 Thread Louis Chauvet
As a connector can be connected and disconnected once a device is created, create a file to allow changing this status. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 45 1 file changed, 45 insertions(+) diff --git a/drivers/gpu/drm

[PATCH RFC v3 13/14] drm/vkms: Introduce configfs for connector EDID

2025-01-21 Thread Louis Chauvet
modes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b/drivers/gpu/drm/vkms/vkms_configfs.c index 76f28862c7652fbd9e84c42b60ad818ddee1485b

[PATCH RFC v3 02/14] drm/vkms: Cleanup configuration field on device destroy

2025-01-21 Thread Louis Chauvet
To avoid having dangling pointers in struct vkms_config, remove all of them when the device is destroyed. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 23 +++ drivers/gpu/drm/vkms/vkms_config.h | 3 ++- drivers/gpu/drm/vkms/vkms_drv.c| 2 +- 3

[PATCH RFC v3 04/14] drm/vkms: Introduce configfs for plane

2025-01-21 Thread Louis Chauvet
`. As the CRTCs and encoders can't be configured yet, the planes are all atteched to the same CRTC and encoder. The current interface is: /config/vkms DEVICE_1 ┣━ enable ┣━ planes ┃ ┣━ PLANE_1 ┃ ┃ ┣━ type ┃ ┣━ PLANE_2 ┃ ┃ ┗━

[PATCH RFC v3 05/14] drm/vkms: Introduce configfs for plane rotation

2025-01-21 Thread Louis Chauvet
To allows the userspace to test many hardware configuration, introduce a new interface to configure the available rotation per planes. VKMS supports any rotation and reflection, so the userspace can choose any combination. The supported rotations are configured by writing a rotation bitmask to

[PATCH RFC v3 03/14] drm/vkms: Introduce ConfigFS interface

2025-01-21 Thread Louis Chauvet
VKMS is manly used to test userspace program and its behavior. The current implementation is not very configurable as you can only have one device, with few specific planes. This is the introduction of a basic interface to dynamically create new devices. The new interface is: /config/vkms

[PATCH RFC v3 01/14] drm/vkms: Add vkms_delete/create_device helper

2025-01-21 Thread Louis Chauvet
In preparation for introduction of ConfigFS support, expose the vkms_destroy/create helper to remove a vkms device. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH RFC v3 00/14] drm/vkms: ConfigFS interface

2025-01-21 Thread Louis Chauvet
VKMS is manly used to test userspace program and its behavior. The current implementation is not very configurable as you can only have one device, with few specific planes. This series aims to introduce a new interface, using ConfigFS, to create and configure more devices. This will introduce

[PATCH v3 16/16] drm/vkms: Introduce config for encoder type

2025-01-21 Thread Louis Chauvet
To allow emulation of different kind of encoders, make the encoder type configurable. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 1 + drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu/drm/vkms/vkms_output.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion

[PATCH v3 13/16] drm/vkms: Introduce config for plane format

2025-01-21 Thread Louis Chauvet
VKMS driver supports all the pixel formats for planes, but for testing it can be useful to only advertise few of them. This new configuration interface will allow configuring the pixel format per planes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 75

[PATCH v3 14/16] drm/vkms: Introduce config for connector status

2025-01-21 Thread Louis Chauvet
VKMS driver does not currently support connector hotpluging. Add an option to change the connector status once a device is created. Signed-off-by: José Expósito [adpated it for my implementation] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 10 ++ drivers/gpu

[PATCH v3 12/16] drm/vkms: Introduce config for connector type

2025-01-21 Thread Louis Chauvet
To allow emulation of different kind of connector, make the connector type configurable. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 1 + drivers/gpu/drm/vkms/vkms_config.h | 1 + drivers/gpu/drm/vkms/vkms_output.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion

[PATCH v3 11/16] drm/vkms: Introduce config for connector

2025-01-21 Thread Louis Chauvet
The current vkms driver only allows the usage of one connector, possibly with a writeback connector. This new configuration structure aims to make the configuration more flexible. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 62

[PATCH v3 15/16] drm/vkms: Introduce config for connector EDID

2025-01-21 Thread Louis Chauvet
To properly test the EDID reading without using the DRM override, add an option to configure the EDID for a connector. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 1 + drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu/drm/vkms/vkms_output.c | 37

[PATCH v3 10/16] drm/vkms: Add test for config structure

2025-01-21 Thread Louis Chauvet
The config structure is a bit complex in term of memory management. Add basic test to avoid breaking it in the future. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/tests/Makefile | 3 + drivers/gpu/drm/vkms/tests/vkms_config_test.c | 137 ++ 2 files

[PATCH v3 05/16] drm/vkms: Introduce config for plane name

2025-01-21 Thread Louis Chauvet
As a plane will be a folder in ConfigFS, add name configuration for plane so it will reflect the folder name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 14 ++ drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu/drm/vkms/vkms_plane.c | 2 +- 3 files

[PATCH v3 06/16] drm/vkms: Introduce config for plane rotation

2025-01-21 Thread Louis Chauvet
VKMS driver supports all the rotation on planes, but for testing it can be useful to only advertise few of them. This new configuration interface will allow configuring the rotation per planes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 9 + drivers/gpu/drm

[PATCH v3 08/16] drm/vkms: Introduce config for encoder name

2025-01-21 Thread Louis Chauvet
As an encoder will be a directory in ConfigFS, add the configuration for encoder name so we will be able to reflect the configfs directory name in the drm name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 6 ++ drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu

[PATCH v3 07/16] drm/vkms: Introduce config for CRTCs and encoders

2025-01-21 Thread Louis Chauvet
The current VKMS driver can only uses one CRTC and one encoder. This patch introduce in the same time CRTC and encoders as they are tighly linked. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 269 + drivers/gpu/drm/vkms/vkms_config.h

[PATCH v3 09/16] drm/vkms: Introduce config for CRTC name

2025-01-21 Thread Louis Chauvet
As a CRTC will be a directory in ConfigFS, add the name configuration for CRTC name so we will be able to reflect the configfs directory name in the drm name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 5 + drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu

[PATCH v3 02/16] drm/vkms: Add a validation function for vkms configuration

2025-01-21 Thread Louis Chauvet
As the configuration will be used by userspace, add a validator to avoid creating a broken DRM device Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 6 ++ drivers/gpu/drm/vkms/vkms_config.h | 13 + 2 files changed, 19 insertions(+) diff --git a/drivers

[PATCH v3 04/16] drm/vkms: Introduce config for plane

2025-01-21 Thread Louis Chauvet
The current vkms driver only allows the usage of one primary, eight overlays and one cursor plane. This new configuration structure aims to make the configuration more flexible. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 92

[PATCH v3 03/16] drm/vkms: Move default_config creation to its own function

2025-01-21 Thread Louis Chauvet
Extract the initialization of the default configuration to a function. Refactor, no functional changes. Signed-off-by: Louis Chauvet [Changes: Cherry pick and solve conflicts] Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/vkms_config.c | 15 +++ drivers/gpu/drm/vkms

[PATCH v3 01/16] drm/vkms: Extract vkms_config header

2025-01-21 Thread Louis Chauvet
Chauvet [Changes: Cherry picked and conflict solve] Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/Makefile | 3 ++- drivers/gpu/drm/vkms/vkms_config.c | 48 ++ drivers/gpu/drm/vkms/vkms_config.h | 32 + drivers/gpu/drm

[PATCH v3 00/16] drm/vkms: Introduce detailed configuration

2025-01-21 Thread Louis Chauvet
The current code is not flexible to configure the VKMS device. In preparation for ConfigFS interface introduce few structure that can be used to configure the device creation: `vkms_config`. This part is splitted from the ConfigFS implementation itself to avoid mixing two complex interfaces. The

[PATCH v16 7/7] drm/vkms: Add support for DRM_FORMAT_R*

2025-01-21 Thread Louis Chauvet
-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 +++- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH v16 3/7] drm/vkms: Drop YUV formats TODO

2025-01-21 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v16 5/7] drm/vkms: Create KUnit tests for YUV conversions

2025-01-21 Thread Louis Chauvet
) - change expected alpha from 0x to 0x - adapt to the new get_conversion_matrix usage - apply the changes from Arthur - move struct pixel_yuv_u8 to the test itself] Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/Kconfig

  1   2   3   4   5   6   7   8   9   10   >