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: <656f3894-58cd-d70c-78ae-b537a7480386@baylibre.com>
Date:   Tue, 30 May 2017 09:29:44 +0200
From:   Neil Armstrong <narmstrong@...libre.com>
To:     Jose Abreu <Jose.Abreu@...opsys.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc:     Daniel Vetter <daniel.vetter@...ll.ch>,
        Liviu Dudau <liviu.dudau@....com>,
        Carlos Palminha <CARLOS.PALMINHA@...opsys.com>
Subject: Re: [PATCH v5 08/10] drm/arm: malidp: Use crtc->mode_valid() callback

On 05/25/2017 04:19 PM, Jose Abreu wrote:
> Now that we have a callback to check if crtc supports a given mode
> we can use it in malidp so that we restrict the number of probbed
> modes to the ones we can actually display.
> 
> Also, remove the mode_fixup() callback as this is no longer needed
> because mode_valid() will be called before.
> 
> NOTE: Not even compiled tested
> 
> Signed-off-by: Jose Abreu <joabreu@...opsys.com>
> Cc: Carlos Palminha <palminha@...opsys.com>
> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> Cc: Liviu Dudau <liviu.dudau@....com>
> Cc: Brian Starkey <brian.starkey@....com>
> Cc: David Airlie <airlied@...ux.ie>
> ---
>  drivers/gpu/drm/arm/malidp_crtc.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
> index 9446a67..4bb38a2 100644
> --- a/drivers/gpu/drm/arm/malidp_crtc.c
> +++ b/drivers/gpu/drm/arm/malidp_crtc.c
> @@ -22,9 +22,8 @@
>  #include "malidp_drv.h"
>  #include "malidp_hw.h"
>  
> -static bool malidp_crtc_mode_fixup(struct drm_crtc *crtc,
> -				   const struct drm_display_mode *mode,
> -				   struct drm_display_mode *adjusted_mode)
> +static enum drm_mode_status malidp_crtc_mode_valid(struct drm_crtc *crtc,
> +						   const struct drm_display_mode *mode)
>  {
>  	struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
>  	struct malidp_hw_device *hwdev = malidp->dev;
> @@ -40,11 +39,11 @@ static bool malidp_crtc_mode_fixup(struct drm_crtc *crtc,
>  		if (rate != req_rate) {
>  			DRM_DEBUG_DRIVER("pxlclk doesn't support %ld Hz\n",
>  					 req_rate);
> -			return false;
> +			return MODE_NOCLOCK;
>  		}
>  	}
>  
> -	return true;
> +	return MODE_OK;
>  }
>  
>  static void malidp_crtc_enable(struct drm_crtc *crtc)
> @@ -408,7 +407,7 @@ static int malidp_crtc_atomic_check(struct drm_crtc *crtc,
>  }
>  
>  static const struct drm_crtc_helper_funcs malidp_crtc_helper_funcs = {
> -	.mode_fixup = malidp_crtc_mode_fixup,
> +	.mode_valid = malidp_crtc_mode_valid,
>  	.enable = malidp_crtc_enable,
>  	.disable = malidp_crtc_disable,
>  	.atomic_check = malidp_crtc_atomic_check,
> 

Reviewed-by: Neil Armstrong <narmstrong@...libre.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ