Re: [PATCH 0/8] drm: fix .get_modes() return values

2024-03-13 Thread Jani Nikula
On Fri, 08 Mar 2024, Thomas Zimmermann  wrote:
> Acked-by: Thomas Zimmermann 
>
> for the series.

Thanks, pushed the lot to drm-misc-next-fixes.

> Do you plan to make the return type an unsigned int eventually?

Not really. The hooks could still return -ENOMEM or something, with no
compiler warnings, and you'd be screwed because you wouldn't even have a
way of checking. You'd just get 4294967284 modes.


BR,
Jani.

-- 
Jani Nikula, Intel


Re: [PATCH 0/8] drm: fix .get_modes() return values

2024-03-08 Thread Thomas Zimmermann

Hi

Am 08.03.24 um 17:03 schrieb Jani Nikula:

The drm_connector_helper_funcs .get_modes() hooks are not supposed to
return negative error codes. Some do, but they're not checked, and could
lead to mysterious errors. Fix this all over the place.


Acked-by: Thomas Zimmermann 

for the series.

Do you plan to make the return type an unsigned int eventually?

Best regards
Thomas



BR,
Jani.

Jani Nikula (8):
   drm/probe-helper: warn about negative .get_modes()
   drm/panel: do not return negative error codes from
 drm_panel_get_modes()
   drm/exynos: do not return negative values from .get_modes()
   drm/bridge: lt8912b: do not return negative values from .get_modes()
   drm/imx/ipuv3: do not return negative values from .get_modes()
   drm/vc4: hdmi: do not return negative values from .get_modes()
   drm/bridge: lt9611uxc: use int for holding number of modes
   drm/exynos: simplify the return value handling in
 exynos_dp_get_modes()

  drivers/gpu/drm/bridge/lontium-lt8912b.c | 16 +++-
  drivers/gpu/drm/bridge/lontium-lt9611uxc.c   |  2 +-
  drivers/gpu/drm/drm_panel.c  | 17 +++--
  drivers/gpu/drm/drm_probe_helper.c   |  7 +++
  drivers/gpu/drm/exynos/exynos_dp.c   |  7 +++
  drivers/gpu/drm/exynos/exynos_drm_vidi.c |  4 ++--
  drivers/gpu/drm/exynos/exynos_hdmi.c |  4 ++--
  drivers/gpu/drm/imx/ipuv3/parallel-display.c |  4 ++--
  drivers/gpu/drm/vc4/vc4_hdmi.c   |  2 +-
  include/drm/drm_modeset_helper_vtables.h |  3 ++-
  10 files changed, 38 insertions(+), 28 deletions(-)



--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



[PATCH 0/8] drm: fix .get_modes() return values

2024-03-08 Thread Jani Nikula
The drm_connector_helper_funcs .get_modes() hooks are not supposed to
return negative error codes. Some do, but they're not checked, and could
lead to mysterious errors. Fix this all over the place.

BR,
Jani.

Jani Nikula (8):
  drm/probe-helper: warn about negative .get_modes()
  drm/panel: do not return negative error codes from
drm_panel_get_modes()
  drm/exynos: do not return negative values from .get_modes()
  drm/bridge: lt8912b: do not return negative values from .get_modes()
  drm/imx/ipuv3: do not return negative values from .get_modes()
  drm/vc4: hdmi: do not return negative values from .get_modes()
  drm/bridge: lt9611uxc: use int for holding number of modes
  drm/exynos: simplify the return value handling in
exynos_dp_get_modes()

 drivers/gpu/drm/bridge/lontium-lt8912b.c | 16 +++-
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c   |  2 +-
 drivers/gpu/drm/drm_panel.c  | 17 +++--
 drivers/gpu/drm/drm_probe_helper.c   |  7 +++
 drivers/gpu/drm/exynos/exynos_dp.c   |  7 +++
 drivers/gpu/drm/exynos/exynos_drm_vidi.c |  4 ++--
 drivers/gpu/drm/exynos/exynos_hdmi.c |  4 ++--
 drivers/gpu/drm/imx/ipuv3/parallel-display.c |  4 ++--
 drivers/gpu/drm/vc4/vc4_hdmi.c   |  2 +-
 include/drm/drm_modeset_helper_vtables.h |  3 ++-
 10 files changed, 38 insertions(+), 28 deletions(-)

-- 
2.39.2