[Intel-gfx] [PATCH 2/2] drm/i915: Drop unnecessary NULL test

Daniel Vetter daniel at ffwll.ch
Thu Dec 10 06:15:21 PST 2015


On Tue, Dec 08, 2015 at 02:48:52PM -0800, Matt Roper wrote:
> We can never be passed a NULL crtc_state (and if we could there are
> plenty of other places later in this function where we access it
> without testing for NULL).
> 
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>

Yup, atomic state structures better exist once we can do
atomic_check/commit().

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2e8d1a8..51980a9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11808,7 +11808,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
>  	bool turn_off, turn_on, visible, was_visible;
>  	struct drm_framebuffer *fb = plane_state->fb;
>  
> -	if (crtc_state && INTEL_INFO(dev)->gen >= 9 &&
> +	if (INTEL_INFO(dev)->gen >= 9 &&
>  	    plane->type != DRM_PLANE_TYPE_CURSOR) {
>  		ret = skl_update_scaler_plane(
>  			to_intel_crtc_state(crtc_state),
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list