Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1658489

Re: [PATCH v2 7/7] drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge.

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 7/7] drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge.
Date 2017-06-06 11:00 +0200
Message-ID <tPivg-6qB-25@gated-at.bofh.it> (permalink)
References <tG1ah-1ut-3@gated-at.bofh.it> <tG1ah-1ut-7@gated-at.bofh.it> <tP2gO-4G7-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Archit,

On Mon, 5 Jun 2017 21:06:20 +0530
Archit Taneja <architt@codeaurora.org> wrote:

> Hi,
> 
> When pushing to drm-misc-next, I got a minor merge conflict when dim tried
> to rebuild drm-tip.
> 
> The reason for the conflict was because the following commit was present
> in drm-tip but not in drm-misc:
> 
> https://cgit.freedesktop.org/drm-tip/commit/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c?id=6bee9b78a7a5ea257b24d93974538938c82b1169
> 
> I fixed the conflict such that drm-tip is rebuit successfully. I'd
> however like if Eric and Boris could have a look at atmel_hlcdc_output.c
> to check if things are okay.

Where can I find the fix you made to fix this problem?

[...]

> >  	if (panel) {
> > -		output->connector.dpms = DRM_MODE_DPMS_OFF;
> > -		output->connector.polled = DRM_CONNECTOR_POLL_CONNECT;
> > -		drm_connector_helper_add(&output->connector,
> > -				&atmel_hlcdc_panel_connector_helper_funcs);
> > -		ret = drm_connector_init(dev, &output->connector,
> > -					 &atmel_hlcdc_panel_connector_funcs,
> > -					 DRM_MODE_CONNECTOR_Unknown);
> > -		if (ret)
> > -			goto err_encoder_cleanup;
> > -
> > -		drm_mode_connector_attach_encoder(&output->connector,
> > -						  &output->encoder);
> > -
> > -		ret = drm_panel_attach(panel, &output->connector);
> > -		if (ret) {
> > -			drm_connector_cleanup(&output->connector);
> > -			goto err_encoder_cleanup;
> > -		}
> > -
> > -		output->panel = panel;
> > +		bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_Unknown);
> > +		if (IS_ERR(bridge))
> > +			return PTR_ERR(bridge);
> >
> >  		return 0;

Just noticed that this is wrong. We should not return here, otherwise
the panel bridge is never attached to the encoder.

> >  	}
> >
> >  	if (bridge) {
> > -		ret = drm_bridge_attach(&output->encoder, bridge, NULL);
> > +		ret = drm_bridge_attach(encoder, bridge, NULL);
> >  		if (!ret)
> >  			return 0;
> > +
> > +		if (panel)
> > +			drm_panel_bridge_remove(bridge);
> >  	}
> >
> > -err_encoder_cleanup:
> > -	drm_encoder_cleanup(&output->encoder);
> > +	drm_encoder_cleanup(encoder);
> >
> >  	return ret;
> >  }
> >  
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 7/7] drm/atmel-hlcdc: Replace the panel usage with  drm_panel_bridge. Archit Taneja <architt@codeaurora.org> - 2017-06-05 17:40 +0200
  Re: [PATCH v2 7/7] drm/atmel-hlcdc: Replace the panel usage with  drm_panel_bridge. Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-06 11:00 +0200
    Re: [PATCH v2 7/7] drm/atmel-hlcdc: Replace the panel usage with  drm_panel_bridge. Archit Taneja <architt@codeaurora.org> - 2017-06-06 12:20 +0200

csiph-web