Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:43AM +0200, Tomi Valkeinen wrote: > K2G doesn't have softreset feature. Instead of having every caller of > dispc_softreset() check for K2G, move the check into dispc_softreset(), > and make dispc_softreset() return 0 in case of K2G. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c > index cdbb88289082..f204a0701e9f 100644 > --- a/drivers/gpu/drm/tidss/tidss_dispc.c > +++ b/drivers/gpu/drm/tidss/tidss_dispc.c > @@ -2707,6 +2707,10 @@ static int dispc_softreset(struct dispc_device *dispc) > u32 val; > int ret; > > + /* K2G display controller does not support soft reset */ > + if (dispc->feat->subrev == DISPC_K2G) > + return 0; > + > /* Soft reset */ > REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1); > /* Wait for reset to complete */ > @@ -2831,12 +2835,9 @@ int dispc_init(struct tidss_device *tidss) > > tidss->dispc = dispc; > > - /* K2G display controller does not support soft reset */ > - if (feat->subrev != DISPC_K2G) { > - r = dispc_softreset(dispc); > - if (r) > - return r; > - } > + r = dispc_softreset(dispc); > + if (r) > + return r; > > return 0; > } > -- Regards, Laurent Pinchart