lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <887bb962-ef79-0e89-4100-62729d148911@tronnes.org>
Date:   Sun, 6 Nov 2022 14:06:37 +0100
From:   Noralf Trønnes <noralf@...nnes.org>
To:     maxime@...no.tech, Karol Herbst <kherbst@...hat.com>,
        Emma Anholt <emma@...olt.net>, Ben Skeggs <bskeggs@...hat.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        Samuel Holland <samuel@...lland.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Maxime Ripard <mripard@...nel.org>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Lyude Paul <lyude@...hat.com>
Cc:     linux-sunxi@...ts.linux.dev, intel-gfx@...ts.freedesktop.org,
        Phil Elwell <phil@...pberrypi.com>,
        linux-arm-kernel@...ts.infradead.org,
        nouveau@...ts.freedesktop.org, Hans de Goede <hdegoede@...hat.com>,
        Dom Cobley <dom@...pberrypi.com>,
        Mateusz Kwiatkowski <kfyatek+publicgit@...il.com>,
        dri-devel@...ts.freedesktop.org,
        Dave Stevenson <dave.stevenson@...pberrypi.com>,
        linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Noralf Trønnes <noralf@...nnes.org>
Subject: Re: [PATCH v6 11/23] drm/connector: Add pixel clock to cmdline mode



Den 26.10.2022 17.33, skrev maxime@...no.tech:
> We'll need to get the pixel clock to generate proper display modes for
> all the current named modes. Let's add it to struct drm_cmdline_mode and
> fill it when parsing the named mode.
> 
> Signed-off-by: Maxime Ripard <maxime@...no.tech>
> ---

I would just squash this with the previous patch, either way:

Reviewed-by: Noralf Trønnes <noralf@...nnes.org>

>  drivers/gpu/drm/drm_modes.c | 9 ++++++---
>  include/drm/drm_connector.h | 7 +++++++
>  2 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index acee23e1a8b7..c826f9583a1d 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -2226,22 +2226,24 @@ static int drm_mode_parse_cmdline_options(const char *str,
>  
>  struct drm_named_mode {
>  	const char *name;
> +	unsigned int pixel_clock_khz;
>  	unsigned int xres;
>  	unsigned int yres;
>  	unsigned int flags;
>  };
>  
> -#define NAMED_MODE(_name, _x, _y, _flags)		\
> +#define NAMED_MODE(_name, _pclk, _x, _y, _flags)	\
>  	{						\
>  		.name = _name,				\
> +		.pixel_clock_khz = _pclk,		\
>  		.xres = _x,				\
>  		.yres = _y,				\
>  		.flags = _flags,			\
>  	}
>  
>  static const struct drm_named_mode drm_named_modes[] = {
> -	NAMED_MODE("NTSC", 720, 480, DRM_MODE_FLAG_INTERLACE),
> -	NAMED_MODE("PAL", 720, 576, DRM_MODE_FLAG_INTERLACE),
> +	NAMED_MODE("NTSC", 13500, 720, 480, DRM_MODE_FLAG_INTERLACE),
> +	NAMED_MODE("PAL", 13500, 720, 576, DRM_MODE_FLAG_INTERLACE),
>  };
>  
>  static int drm_mode_parse_cmdline_named_mode(const char *name,
> @@ -2282,6 +2284,7 @@ static int drm_mode_parse_cmdline_named_mode(const char *name,
>  			continue;
>  
>  		strcpy(cmdline_mode->name, mode->name);
> +		cmdline_mode->pixel_clock = mode->pixel_clock_khz;
>  		cmdline_mode->xres = mode->xres;
>  		cmdline_mode->yres = mode->yres;
>  		cmdline_mode->interlace = !!(mode->flags & DRM_MODE_FLAG_INTERLACE);
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 96b2e4e12334..5c5e67de2296 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1273,6 +1273,13 @@ struct drm_cmdline_mode {
>  	 */
>  	bool bpp_specified;
>  
> +	/**
> +	 * @pixel_clock:
> +	 *
> +	 * Pixel Clock in kHz. Optional.
> +	 */
> +	unsigned int pixel_clock;
> +
>  	/**
>  	 * @xres:
>  	 *
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ