Re: [PATCH 2/8] drm/i915: Change get_existing_crtc_state to old state

Mahesh Kumar
2017-08-01T06:42:52Z

Hi,

As per my understanding "get_existing_*_state == get_new_*_state"

It looks like you are trying to use currently available unused wrapper
for completely different purpose. But IMHO you should create a new
wrapper for get_old_state

& this should be renamed to get_new_state. :)

-Mahesh

On Thursday 20 July 2017 06:45 PM, Maarten Lankhorst wrote:
> get_existing_crtc_state is currently unused, but the next commit
> needs to access the old intel state. Rename this and use this
> as convenience wrapper.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_drv.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index f59507137347..3723ee443faa 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1944,12 +1944,12 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
> }
>
> static inline struct intel_crtc_state *
> -intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
> - struct intel_crtc *crtc)
> +intel_atomic_get_old_crtc_state(struct drm_atomic_state *state,
> + struct intel_crtc *crtc)
> {
> struct drm_crtc_state *crtc_state;
>
> - crtc_state = drm_atomic_get_existing_crtc_state(state, &crtc->base);
> + crtc_state = drm_atomic_get_old_crtc_state(state, &crtc->base);
>
> if (crtc_state)
> return to_intel_crtc_state(crtc_state);