Re: [linux-sunxi] Re: [PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-09 Thread Maxime Ripard
On Thu, Mar 09, 2017 at 07:31:27PM +0800, Chen-Yu Tsai wrote: > >> Additionally, the mux registers are only valid in the first TCON, meaning > >> it must available be active in 2 pipeline chips. It's also why we'd pass > >> "struct drm_device *" instead of "struct sun4i_tcon *". > > > > H. That

Re: [linux-sunxi] Re: [PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-09 Thread Chen-Yu Tsai
On Thu, Mar 9, 2017 at 6:58 PM, Maxime Ripard wrote: > On Wed, Mar 08, 2017 at 11:51:39AM +0800, Chen-Yu Tsai wrote: >> On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard >> wrote: >> > Even though that mux is undocumented, it seems like it needs to be set to 1 >> > when using composite, and 0 when us

Re: [PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-09 Thread Maxime Ripard
On Wed, Mar 08, 2017 at 11:51:39AM +0800, Chen-Yu Tsai wrote: > On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard > wrote: > > Even though that mux is undocumented, it seems like it needs to be set to 1 > > when using composite, and 0 when using HDMI. > > > > Signed-off-by: Maxime Ripard > > --- > >

Re: [PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-07 Thread Stefan Monnier
>> + if (encoder->encoder_type == DRM_MODE_ENCODER_TVDAC) >> + val = 1; >> + else >> + val = 0; Isn't this better written as val = (encoder->encoder_type == DRM_MODE_ENCODER_TVDAC); -- Stefan

Re: [PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-07 Thread Chen-Yu Tsai
On Tue, Mar 7, 2017 at 4:56 PM, Maxime Ripard wrote: > Even though that mux is undocumented, it seems like it needs to be set to 1 > when using composite, and 0 when using HDMI. > > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 7 ++- > 1 file changed, 6 insertion

[PATCH 10/15] drm/sun4i: tcon: Switch mux on only for composite

2017-03-07 Thread Maxime Ripard
Even though that mux is undocumented, it seems like it needs to be set to 1 when using composite, and 0 when using HDMI. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.