1. 13 Dec, 2023 37 commits
  2. 12 Dec, 2023 3 commits
    • Paul Cercueil's avatar
      drm/exynos: dpi: Change connector type to DPI · ead5a41c
      Paul Cercueil authored
      When exynos_drm_dpi.c was written, DRM_MODE_CONNECTOR_DPI did not exist
      yet and I guess that's the reason why DRM_MODE_CONNECTOR_VGA was used as
      the connector type.
      
      However, now it makes more sense to use DRM_MODE_CONNECTOR_DPI as the
      connector type.
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      ead5a41c
    • Uwe Kleine-König's avatar
      drm/exynos: Convert to platform remove callback returning void · 4fe7a1ec
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      fix merge conflict and drop duplicated patch description.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      4fe7a1ec
    • Douglas Anderson's avatar
      drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time · 16ac5b21
      Douglas Anderson authored
      Based on grepping through the source code this driver appears to be
      missing a call to drm_atomic_helper_shutdown() at system shutdown time
      and at driver unbind time. Among other things, this means that if a
      panel is in use that it won't be cleanly powered off at system
      shutdown time.
      
      The fact that we should call drm_atomic_helper_shutdown() in the case
      of OS shutdown/restart and at driver remove (or unbind) time comes
      straight out of the kernel doc "driver instance overview" in
      drm_drv.c.
      
      A few notes about this fix:
      - When adding drm_atomic_helper_shutdown() to the unbind path, I added
        it after drm_kms_helper_poll_fini() since that's when other drivers
        seemed to have it.
      - Technically with a previous patch, ("drm/atomic-helper:
        drm_atomic_helper_shutdown(NULL) should be a noop"), we don't
        actually need to check to see if our "drm" pointer is NULL before
        calling drm_atomic_helper_shutdown(). We'll leave the "if" test in,
        though, so that this patch can land without any dependencies. It
        could potentially be removed later.
      - This patch also makes sure to set the drvdata to NULL in the case of
        bind errors to make sure that shutdown can't access freed data.
      Suggested-by: default avatarMaxime Ripard <mripard@kernel.org>
      Reviewed-by: default avatarMaxime Ripard <mripard@kernel.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      16ac5b21