drm/panel: himax-hx83102: use wrapped MIPI DCS functions
authorDouglas Anderson <dianders@chromium.org>
Fri, 17 May 2024 21:36:43 +0000 (14:36 -0700)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 21 May 2024 08:01:20 +0000 (10:01 +0200)
commita2ab7cb169da38757323929f7b3b4cf396ec53b5
treeeec065f585e92ebe4cfec0b547a345bae5487ca3
parent676a079fb3be66aed12cf40f236c77b8e7c189c3
drm/panel: himax-hx83102: use wrapped MIPI DCS functions

Take advantage of some of the new wrapped routines introduced by
commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline
handling") to simplify the himax-hx83102 driver a bit more. This gets
rid of some extra error prints (since the _multi functions all print
errors for you) and simplifies the code a bit.

One thing here that isn't just refactoring is that in a few places we
now check with errors with "if (err)" instead of "if (err < 0)". All
errors are expected to be negative so this is not expected to have any
impact. The _multi code internally considers anything non-zero to be
an error so this just makes things consistent.

It can also be noted that hx83102_prepare() has a mix of things that
can take advantage of _multi calls and things that can't. The cleanest
seemed to be to use the multi_ctx still but consistently use the
"accum_err" variable for error returns, though that's definitely a
style decision with pros and cons.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid
drivers/gpu/drm/panel/panel-himax-hx83102.c