[PATCH 5/6] drm/rcar_du: use drm_encoder pointer for drm_writeback_connector

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Mar 11 07:28:51 UTC 2022


Hi Abhinav

Thank you for the patch.

On Thu, Mar 10, 2022 at 05:49:59PM -0800, Abhinav Kumar wrote:
> Make changes to rcar_du driver to start using drm_encoder pointer
> for drm_writeback_connector.
> 
> Co-developed-by: Kandpal Suraj <suraj.kandpal at intel.com>
> Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_writeback.c b/drivers/gpu/drm/rcar-du/rcar_du_writeback.c
> index c79d125..03930ad 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_writeback.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_writeback.c
> @@ -200,7 +200,8 @@ int rcar_du_writeback_init(struct rcar_du_device *rcdu,
>  {
>  	struct drm_writeback_connector *wb_conn = &rcrtc->writeback;
>  
> -	wb_conn->encoder.possible_crtcs = 1 << drm_crtc_index(&rcrtc->crtc);
> +	wb_conn->encoder = kzalloc(sizeof(struct drm_encoder), GFP_KERNEL);

Where is this freed ?

> +	wb_conn->encoder->possible_crtcs = 1 << drm_crtc_index(&rcrtc->crtc);
>  	drm_connector_helper_add(&wb_conn->base,
>  				 &rcar_du_wb_conn_helper_funcs);
>  

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list