[PATCH 1/3] drm: Add DRM_MODE_TV_MODE_MONOCHROME

Maxime Ripard mripard at kernel.org
Tue Jun 18 09:24:56 UTC 2024


Hi,

On Fri, Feb 16, 2024 at 06:48:55PM GMT, Dave Stevenson wrote:
> From: Nick Hollinghurst <nick.hollinghurst at raspberrypi.com>
> 
> Add this as a value for enum_drm_connector_tv_mode, represented
> by the string "Mono", to generate video with no colour encoding
> or bursts. Define it to have no pedestal (since only NTSC-M calls
> for a pedestal).
> 
> Change default mode creation to acommodate the new tv_mode value
> which comprises both 525-line and 625-line formats.
> 
> Signed-off-by: Nick Hollinghurst <nick.hollinghurst at raspberrypi.com>
> Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
> ---
>  drivers/gpu/drm/drm_connector.c    | 7 +++++++
>  drivers/gpu/drm/drm_modes.c        | 5 ++++-
>  drivers/gpu/drm/drm_probe_helper.c | 5 +++--
>  include/drm/drm_connector.h        | 7 +++++++
>  4 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index b0516505f7ae..fe05d27f3404 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1005,6 +1005,7 @@ static const struct drm_prop_enum_list drm_tv_mode_enum_list[] = {
>  	{ DRM_MODE_TV_MODE_PAL_M, "PAL-M" },
>  	{ DRM_MODE_TV_MODE_PAL_N, "PAL-N" },
>  	{ DRM_MODE_TV_MODE_SECAM, "SECAM" },
> +	{ DRM_MODE_TV_MODE_MONOCHROME, "Mono" },
>  };
>  DRM_ENUM_NAME_FN(drm_get_tv_mode_name, drm_tv_mode_enum_

We'll need to have kunit tests here for that value in:

* drm_cmdline_parser_test to make sure it's properly read from the
  command line
* drm_connector_test to make sure the name is properly associated to its
  enum value
* drm_modes_test to make sure the modes generated for that tv mode
  actually returns 625 lines

Those would all have been additional patches, and the next patches need
a new version as well so please add them to your v2.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240618/937c939e/attachment.sig>


More information about the dri-devel mailing list