Re: [PATCH 4/5] drm/atomic: use connector references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 27 April 2016 at 03:03, Dave Airlie <airlied@xxxxxxxxx> wrote:
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 9d5e3c8..d899dac 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -1179,6 +1179,15 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
>
>         conn_state->crtc = crtc;
>
> +       /* If we had no crtc then got one, add a reference,
> +        * if we had a crtc and are going to none, drop a reference,
> +        * otherwise just keep the reference we have.
> +        */
> +       if (!had_crtc && crtc)
> +               drm_connector_reference(conn_state->connector);
> +       else if (!crtc && had_crtc)
> +                drm_connector_unreference(conn_state->connector);

Similarly to the non-atomic comments, can you drop the had_crtc test
here, and always ref if crtc, and unref if !crtc?

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux