dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] DRM: imx spring-cleaning
@ 2020-02-27 16:21 Marco Felsch
  2020-02-27 16:21 ` [PATCH 01/17] drm/imx: drop useless best_encoder callback Marco Felsch
                   ` (16 more replies)
  0 siblings, 17 replies; 24+ messages in thread
From: Marco Felsch @ 2020-02-27 16:21 UTC (permalink / raw)
  To: p.zabel, airlied, daniel, shawnguo, stefan, rmk+kernel
  Cc: kernel, linux-arm-kernel, dri-devel

Hi all,

the purpose of this patch series is to address bug reported here
[1]. There where two approaches [2,3] to fix this but non of them get
mainline. The issue is caused by the fact that we are using devres
allocation for the driver (pd,ldb,hdmi,tve) state struct which holds
also the 'struct drm_encoder/connector'. 

We need to move the driver state containers containing the drm members
out of the devres memory management into the drm memory management
framework to fix the bug [1]. Therefore we need to split the single
driver state struct into two: one for the drm_connector device and one
for the drm_encoder device.

The series removes some legacy code paths too and removes the useless
imx_drm_encoder_destroy() API.

Pls don't be surprised about the edid memory leak fix patches. I went
this way because those patche can be applied independently of the last
patch which did the conversion from the devres alloc to the non-devres
alloc.

I did the following tests for each component:
 - probe successful
 - correct failure handling during probe
 - bind / unbind (module load/unload)

I also kept a few lines longer than 80char to improve readability.

Other tester are welcome =)

Regards,
  Marco

[1] https://www.spinics.net/lists/dri-devel/msg189388.html
[2] https://lkml.org/lkml/2018/10/16/1148
[3] https://lkml.org/lkml/2019/4/2/612

Marco Felsch (17):
  drm/imx: drop useless best_encoder callback
  drm/imx: parallel-display: fix edid memory leak
  drm/imx: parallel-display: move panel/bridge detection to fail early
  drm/imx: parallel-display: detach panel within drm_encoder destroy
  drm/imx: parallel-display: split encoder and decoder states
  imx/drm: parallel-display: split attach function
  drm/imx: tve: add regulator_disable devm_action
  drm/imx: tve: split global state container
  drm/imx: imx-ldb: remove useless enum
  drm/imx: imx-ldb: fix edid memory leak
  drm/imx: imx-ldb: release ldb-channel resources within encoder destroy
  drm/imx: remove imx_drm_encoder_destroy helper
  drm/imx: imx-ldb: split imx_ldb devres allocation context
  drm/imx: imx-ldb: add ldb_is_dual helper
  drm/imx: imx-ldb: split encoder and decoder states
  drm/imx: imx-ldb: refactor imx_ldb_bind
  drm/imx: fix drm_mode_config_cleanup race condition

 drivers/gpu/drm/imx/dw_hdmi-imx.c      |  28 +-
 drivers/gpu/drm/imx/imx-drm-core.c     |   9 +-
 drivers/gpu/drm/imx/imx-drm.h          |   1 -
 drivers/gpu/drm/imx/imx-ldb.c          | 514 ++++++++++++++-----------
 drivers/gpu/drm/imx/imx-tve.c          | 173 ++++++---
 drivers/gpu/drm/imx/ipuv3-crtc.c       |  28 +-
 drivers/gpu/drm/imx/parallel-display.c | 142 ++++---
 7 files changed, 523 insertions(+), 372 deletions(-)

-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-03-02 21:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 16:21 [PATCH 00/17] DRM: imx spring-cleaning Marco Felsch
2020-02-27 16:21 ` [PATCH 01/17] drm/imx: drop useless best_encoder callback Marco Felsch
2020-02-27 16:21 ` [PATCH 02/17] drm/imx: parallel-display: fix edid memory leak Marco Felsch
2020-02-27 16:21 ` [PATCH 03/17] drm/imx: parallel-display: move panel/bridge detection to fail early Marco Felsch
2020-02-27 16:21 ` [PATCH 04/17] drm/imx: parallel-display: detach panel within drm_encoder destroy Marco Felsch
2020-02-27 16:21 ` [PATCH 05/17] drm/imx: parallel-display: split encoder and decoder states Marco Felsch
2020-02-27 16:21 ` [PATCH 06/17] imx/drm: parallel-display: split attach function Marco Felsch
2020-02-27 16:21 ` [PATCH 07/17] drm/imx: tve: add regulator_disable devm_action Marco Felsch
2020-02-27 16:21 ` [PATCH 08/17] drm/imx: tve: split global state container Marco Felsch
2020-02-27 16:21 ` [PATCH 09/17] drm/imx: imx-ldb: remove useless enum Marco Felsch
2020-02-27 16:21 ` [PATCH 10/17] drm/imx: imx-ldb: fix edid memory leak Marco Felsch
2020-02-27 16:21 ` [PATCH 11/17] drm/imx: imx-ldb: release ldb-channel resources within encoder destroy Marco Felsch
2020-02-27 16:21 ` [PATCH 12/17] drm/imx: remove imx_drm_encoder_destroy helper Marco Felsch
2020-02-27 16:21 ` [PATCH 13/17] drm/imx: imx-ldb: split imx_ldb devres allocation context Marco Felsch
2020-02-27 16:21 ` [PATCH 14/17] drm/imx: imx-ldb: add ldb_is_dual helper Marco Felsch
2020-02-27 16:21 ` [PATCH 15/17] drm/imx: imx-ldb: split encoder and decoder states Marco Felsch
2020-02-27 16:21 ` [PATCH 16/17] drm/imx: imx-ldb: refactor imx_ldb_bind Marco Felsch
2020-02-27 16:21 ` [PATCH 17/17] drm/imx: fix drm_mode_config_cleanup race condition Marco Felsch
2020-02-27 17:29   ` Daniel Vetter
2020-02-27 17:44     ` Lucas Stach
2020-02-27 18:14       ` Daniel Vetter
2020-02-27 18:23         ` Marco Felsch
2020-03-02 18:07         ` Philipp Zabel
2020-03-02 21:32           ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).