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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d96df677-a1a7-ae49-bda6-abad025dc974@tronnes.org>
Date:   Mon, 8 Aug 2022 14:49:08 +0200
From:   Noralf Trønnes <noralf@...nnes.org>
To:     Maxime Ripard <maxime@...no.tech>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Jerome Brunet <jbrunet@...libre.com>,
        Samuel Holland <samuel@...lland.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Daniel Vetter <daniel@...ll.ch>, Emma Anholt <emma@...olt.net>,
        David Airlie <airlied@...ux.ie>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Kevin Hilman <khilman@...libre.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Maxime Ripard <mripard@...nel.org>
Cc:     linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Phil Elwell <phil@...pberrypi.com>,
        Mateusz Kwiatkowski <kfyatek+publicgit@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Dave Stevenson <dave.stevenson@...pberrypi.com>,
        linux-amlogic@...ts.infradead.org, dri-devel@...ts.freedesktop.org,
        Dom Cobley <dom@...pberrypi.com>
Subject: Re: [PATCH v1 06/35] drm/connector: Only register TV mode property if
 present



Den 29.07.2022 18.34, skrev Maxime Ripard:
> The drm_create_tv_properties() will create the TV mode property
> unconditionally.
> 
> However, since we'll gradually phase it out, let's register it only if we
> have a list passed as an argument. This will make the transition easier.
> 
> Signed-off-by: Maxime Ripard <maxime@...no.tech>
> 

I don't understand why this makes the transition easier, but if you
think so:

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

> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 68a4e47f85a9..d73a68764b6e 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1684,7 +1684,6 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
>  	struct drm_property *tv_selector;
>  	struct drm_property *tv_subconnector;
>  	struct drm_property *tv_norm;
> -	unsigned int i;
>  
>  	if (dev->mode_config.tv_select_subconnector_property)
>  		return 0;
> @@ -1723,15 +1722,19 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
>  		goto nomem;
>  	dev->mode_config.tv_norm_property = tv_norm;
>  
> -	dev->mode_config.tv_mode_property =
> -		drm_property_create(dev, DRM_MODE_PROP_ENUM,
> -				    "mode", num_modes);
> -	if (!dev->mode_config.tv_mode_property)
> -		goto nomem;
> +	if (num_modes) {
> +		unsigned int i;
>  
> -	for (i = 0; i < num_modes; i++)
> -		drm_property_add_enum(dev->mode_config.tv_mode_property,
> -				      i, modes[i]);
> +		dev->mode_config.tv_mode_property =
> +			drm_property_create(dev, DRM_MODE_PROP_ENUM,
> +					    "mode", num_modes);
> +		if (!dev->mode_config.tv_mode_property)
> +			goto nomem;
> +
> +		for (i = 0; i < num_modes; i++)
> +			drm_property_add_enum(dev->mode_config.tv_mode_property,
> +					      i, modes[i]);
> +	}
>  
>  	dev->mode_config.tv_brightness_property =
>  		drm_property_create_range(dev, 0, "brightness", 0, 100);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ