* [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled @ 2018-09-21 11:49 Nguyen An Hoan 2018-09-21 11:49 ` Nguyen An Hoan 2018-09-21 17:03 ` Mark Brown 0 siblings, 2 replies; 5+ messages in thread From: Nguyen An Hoan @ 2018-09-21 11:49 UTC (permalink / raw) To: broonie, linux-renesas-soc, geert+renesas Cc: laurent.pinchart, kuninori.morimoto.gx, yoshihiro.shimoda.uh, magnus.damm, h-inayoshi, nv-dung, cv-dong, na-hoan From: Hoan Nguyen An <na-hoan@jinso.co.jp> Skip return EPROBE_DEFER when DRM_RCAR_DW_HDMI is disabled in case HDMI initialize. At this time, the rcar-du driver not be able to successfully initialize if disable DRM_RCAR_DW_HDMI (rcar_du_probe return error), so can not use other features such as RGB Analog, this patch to fix. Hoan Nguyen An (1): drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled 2018-09-21 11:49 [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled Nguyen An Hoan @ 2018-09-21 11:49 ` Nguyen An Hoan 2018-09-21 17:21 ` Mark Brown 2018-11-22 23:23 ` Laurent Pinchart 2018-09-21 17:03 ` Mark Brown 1 sibling, 2 replies; 5+ messages in thread From: Nguyen An Hoan @ 2018-09-21 11:49 UTC (permalink / raw) To: broonie, linux-renesas-soc, geert+renesas Cc: laurent.pinchart, kuninori.morimoto.gx, yoshihiro.shimoda.uh, magnus.damm, h-inayoshi, nv-dung, cv-dong, na-hoan From: Hoan Nguyen An <na-hoan@jinso.co.jp> Skip return EPROBE_DEFER when DRM_RCAR_DW_HDMI is disabled in case HDMI initialize. At this time, the rcar-du driver not be able to successfully initialize if disable DRM_RCAR_DW_HDMI (rcar_du_probe return error), so can not use other features such as RGB Analog, this patch to fix. Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> --- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c index f9c933d..4dbc508 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c @@ -66,8 +66,15 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, /* Locate the DRM bridge from the encoder DT node. */ bridge = of_drm_find_bridge(enc_node); if (!bridge) { +#if IS_ENABLED(CONFIG_DRM_RCAR_DW_HDMI) ret = -EPROBE_DEFER; goto done; +#else + if (output == RCAR_DU_OUTPUT_HDMI0 || + output == RCAR_DU_OUTPUT_HDMI1) + ret = 0; + goto done; +#endif } ret = drm_encoder_init(rcdu->ddev, encoder, &encoder_funcs, -- 2.7.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled 2018-09-21 11:49 ` Nguyen An Hoan @ 2018-09-21 17:21 ` Mark Brown 2018-11-22 23:23 ` Laurent Pinchart 1 sibling, 0 replies; 5+ messages in thread From: Mark Brown @ 2018-09-21 17:21 UTC (permalink / raw) To: Nguyen An Hoan Cc: linux-renesas-soc, geert+renesas, laurent.pinchart, kuninori.morimoto.gx, yoshihiro.shimoda.uh, magnus.damm, h-inayoshi, nv-dung, cv-dong [-- Attachment #1: Type: text/plain, Size: 768 bytes --] On Fri, Sep 21, 2018 at 08:49:03PM +0900, Nguyen An Hoan wrote: > @@ -66,8 +66,15 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, > /* Locate the DRM bridge from the encoder DT node. */ > bridge = of_drm_find_bridge(enc_node); > if (!bridge) { > +#if IS_ENABLED(CONFIG_DRM_RCAR_DW_HDMI) > ret = -EPROBE_DEFER; > goto done; > +#else > + if (output == RCAR_DU_OUTPUT_HDMI0 || > + output == RCAR_DU_OUTPUT_HDMI1) > + ret = 0; > + goto done; > +#endif > } This seems to make sense to me assuming there's no other encoder that could possibly connected though I'm not 100% up to speed on the DRM subsystem so it's possible I'm missing some framework feature that should help here. I'm not a DRM expert though. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled 2018-09-21 11:49 ` Nguyen An Hoan 2018-09-21 17:21 ` Mark Brown @ 2018-11-22 23:23 ` Laurent Pinchart 1 sibling, 0 replies; 5+ messages in thread From: Laurent Pinchart @ 2018-11-22 23:23 UTC (permalink / raw) To: Nguyen An Hoan Cc: broonie, linux-renesas-soc, geert+renesas, kuninori.morimoto.gx, yoshihiro.shimoda.uh, magnus.damm, h-inayoshi, nv-dung, cv-dong Hello Hoan, Thank you for the patch. On Friday, 21 September 2018 14:49:03 EET Nguyen An Hoan wrote: > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > Skip return EPROBE_DEFER when DRM_RCAR_DW_HDMI is disabled in case HDMI > initialize. At this time, the rcar-du driver not be able to successfully > initialize if disable DRM_RCAR_DW_HDMI (rcar_du_probe return error), > so can not use other features such as RGB Analog, this patch to fix. > > Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> > --- > drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c > b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c index f9c933d..4dbc508 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c > @@ -66,8 +66,15 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, > /* Locate the DRM bridge from the encoder DT node. */ > bridge = of_drm_find_bridge(enc_node); > if (!bridge) { > +#if IS_ENABLED(CONFIG_DRM_RCAR_DW_HDMI) > ret = -EPROBE_DEFER; > goto done; > +#else > + if (output == RCAR_DU_OUTPUT_HDMI0 || > + output == RCAR_DU_OUTPUT_HDMI1) > + ret = 0; > + goto done; > +#endif The dw-hdmi driver could be compiled out of tree, I don't think is the right fix. If the HDMI output should be disabled on a particular system, the corresponding DT node should be marked as disable, and no change to the DU driver is needed. Otherwise the necessary drivers should be present. In the long term we should implement support for registration of additional encoders at runtime, but that's way down the road. > } > > ret = drm_encoder_init(rcdu->ddev, encoder, &encoder_funcs, -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled 2018-09-21 11:49 [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled Nguyen An Hoan 2018-09-21 11:49 ` Nguyen An Hoan @ 2018-09-21 17:03 ` Mark Brown 1 sibling, 0 replies; 5+ messages in thread From: Mark Brown @ 2018-09-21 17:03 UTC (permalink / raw) To: Nguyen An Hoan Cc: linux-renesas-soc, geert+renesas, laurent.pinchart, kuninori.morimoto.gx, yoshihiro.shimoda.uh, magnus.damm, h-inayoshi, nv-dung, cv-dong [-- Attachment #1: Type: text/plain, Size: 716 bytes --] On Fri, Sep 21, 2018 at 08:49:02PM +0900, Nguyen An Hoan wrote: > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > Skip return EPROBE_DEFER when DRM_RCAR_DW_HDMI is disabled in case HDMI initialize. > At this time, the rcar-du driver not be able to successfully initialize > if disable DRM_RCAR_DW_HDMI (rcar_du_probe return error), > so can not use other features such as RGB Analog, this patch to fix. Please don't send cover letters for single patches, if there is anything that needs saying put it in the changelog of the patch or after the --- if it's administrative stuff. This reduces mail volume and ensures that any important information is recorded in the changelog rather than being lost. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-23 10:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-09-21 11:49 [PATCH] drm: rcar-du: fix probe error when DRM_RCAR_DW_HDMI disabled Nguyen An Hoan 2018-09-21 11:49 ` Nguyen An Hoan 2018-09-21 17:21 ` Mark Brown 2018-11-22 23:23 ` Laurent Pinchart 2018-09-21 17:03 ` Mark Brown
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.