Message ID | 20201127085241.848461-1-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/omap: sdi: fix bridge enable/disable | expand |
Hi, On Fri, Nov 27, 2020 at 10:52:41AM +0200, Tomi Valkeinen wrote: > When the SDI output was converted to DRM bridge, the atomic versions of > enable and disable funcs were used. This was not intended, as that would > require implementing other atomic funcs too. This leads to: > > WARNING: CPU: 0 PID: 18 at drivers/gpu/drm/drm_bridge.c:708 drm_atomic_helper_commit_modeset_enables+0x134/0x268 > > and display not working. > > Fix this by using the legacy enable/disable funcs. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> > Fixes: 8bef8a6d5da81b909a190822b96805a47348146f ("drm/omap: sdi: Register a drm_bridge") > Cc: stable@vger.kernel.org # v5.7+ > Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Thanks, A. > --- > drivers/gpu/drm/omapdrm/dss/sdi.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c > index 033fd30074b0..282e4c837cd9 100644 > --- a/drivers/gpu/drm/omapdrm/dss/sdi.c > +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c > @@ -195,8 +195,7 @@ static void sdi_bridge_mode_set(struct drm_bridge *bridge, > sdi->pixelclock = adjusted_mode->clock * 1000; > } > > -static void sdi_bridge_enable(struct drm_bridge *bridge, > - struct drm_bridge_state *bridge_state) > +static void sdi_bridge_enable(struct drm_bridge *bridge) > { > struct sdi_device *sdi = drm_bridge_to_sdi(bridge); > struct dispc_clock_info dispc_cinfo; > @@ -259,8 +258,7 @@ static void sdi_bridge_enable(struct drm_bridge *bridge, > regulator_disable(sdi->vdds_sdi_reg); > } > > -static void sdi_bridge_disable(struct drm_bridge *bridge, > - struct drm_bridge_state *bridge_state) > +static void sdi_bridge_disable(struct drm_bridge *bridge) > { > struct sdi_device *sdi = drm_bridge_to_sdi(bridge); > > @@ -278,8 +276,8 @@ static const struct drm_bridge_funcs sdi_bridge_funcs = { > .mode_valid = sdi_bridge_mode_valid, > .mode_fixup = sdi_bridge_mode_fixup, > .mode_set = sdi_bridge_mode_set, > - .atomic_enable = sdi_bridge_enable, > - .atomic_disable = sdi_bridge_disable, > + .enable = sdi_bridge_enable, > + .disable = sdi_bridge_disable, > }; > > static void sdi_bridge_init(struct sdi_device *sdi) > -- > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki >
Hi Tomi, Thank you for the patch. On Fri, Nov 27, 2020 at 10:52:41AM +0200, Tomi Valkeinen wrote: > When the SDI output was converted to DRM bridge, the atomic versions of > enable and disable funcs were used. This was not intended, as that would > require implementing other atomic funcs too. This leads to: > > WARNING: CPU: 0 PID: 18 at drivers/gpu/drm/drm_bridge.c:708 drm_atomic_helper_commit_modeset_enables+0x134/0x268 > > and display not working. > > Fix this by using the legacy enable/disable funcs. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> > Fixes: 8bef8a6d5da81b909a190822b96805a47348146f ("drm/omap: sdi: Register a drm_bridge") > Cc: stable@vger.kernel.org # v5.7+ > Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/omapdrm/dss/sdi.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c > index 033fd30074b0..282e4c837cd9 100644 > --- a/drivers/gpu/drm/omapdrm/dss/sdi.c > +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c > @@ -195,8 +195,7 @@ static void sdi_bridge_mode_set(struct drm_bridge *bridge, > sdi->pixelclock = adjusted_mode->clock * 1000; > } > > -static void sdi_bridge_enable(struct drm_bridge *bridge, > - struct drm_bridge_state *bridge_state) > +static void sdi_bridge_enable(struct drm_bridge *bridge) > { > struct sdi_device *sdi = drm_bridge_to_sdi(bridge); > struct dispc_clock_info dispc_cinfo; > @@ -259,8 +258,7 @@ static void sdi_bridge_enable(struct drm_bridge *bridge, > regulator_disable(sdi->vdds_sdi_reg); > } > > -static void sdi_bridge_disable(struct drm_bridge *bridge, > - struct drm_bridge_state *bridge_state) > +static void sdi_bridge_disable(struct drm_bridge *bridge) > { > struct sdi_device *sdi = drm_bridge_to_sdi(bridge); > > @@ -278,8 +276,8 @@ static const struct drm_bridge_funcs sdi_bridge_funcs = { > .mode_valid = sdi_bridge_mode_valid, > .mode_fixup = sdi_bridge_mode_fixup, > .mode_set = sdi_bridge_mode_set, > - .atomic_enable = sdi_bridge_enable, > - .atomic_disable = sdi_bridge_disable, > + .enable = sdi_bridge_enable, > + .disable = sdi_bridge_disable, > }; > > static void sdi_bridge_init(struct sdi_device *sdi)
On 28/11/2020 19:45, Aaro Koskinen wrote: > Hi, > > On Fri, Nov 27, 2020 at 10:52:41AM +0200, Tomi Valkeinen wrote: >> When the SDI output was converted to DRM bridge, the atomic versions of >> enable and disable funcs were used. This was not intended, as that would >> require implementing other atomic funcs too. This leads to: >> >> WARNING: CPU: 0 PID: 18 at drivers/gpu/drm/drm_bridge.c:708 drm_atomic_helper_commit_modeset_enables+0x134/0x268 >> >> and display not working. >> >> Fix this by using the legacy enable/disable funcs. >> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> >> Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> >> Fixes: 8bef8a6d5da81b909a190822b96805a47348146f ("drm/omap: sdi: Register a drm_bridge") >> Cc: stable@vger.kernel.org # v5.7+ >> Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> > > Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Thanks! I pushed this to drm-misc-fixes. Hopefully with this and Sebastian's patch N900 display now works. Tomi
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 033fd30074b0..282e4c837cd9 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -195,8 +195,7 @@ static void sdi_bridge_mode_set(struct drm_bridge *bridge, sdi->pixelclock = adjusted_mode->clock * 1000; } -static void sdi_bridge_enable(struct drm_bridge *bridge, - struct drm_bridge_state *bridge_state) +static void sdi_bridge_enable(struct drm_bridge *bridge) { struct sdi_device *sdi = drm_bridge_to_sdi(bridge); struct dispc_clock_info dispc_cinfo; @@ -259,8 +258,7 @@ static void sdi_bridge_enable(struct drm_bridge *bridge, regulator_disable(sdi->vdds_sdi_reg); } -static void sdi_bridge_disable(struct drm_bridge *bridge, - struct drm_bridge_state *bridge_state) +static void sdi_bridge_disable(struct drm_bridge *bridge) { struct sdi_device *sdi = drm_bridge_to_sdi(bridge); @@ -278,8 +276,8 @@ static const struct drm_bridge_funcs sdi_bridge_funcs = { .mode_valid = sdi_bridge_mode_valid, .mode_fixup = sdi_bridge_mode_fixup, .mode_set = sdi_bridge_mode_set, - .atomic_enable = sdi_bridge_enable, - .atomic_disable = sdi_bridge_disable, + .enable = sdi_bridge_enable, + .disable = sdi_bridge_disable, }; static void sdi_bridge_init(struct sdi_device *sdi)