From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: linux-sh@vger.kernel.org Subject: [PATCH v3 4/9] drm: rcar-du: Replace drm_encoder with drm_slave_encoder Date: Sun, 26 Oct 2014 15:24:23 +0000 [thread overview] Message-ID: <1414337068-28664-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1414337068-28664-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> DRM slave encoders require their associated struct drm_encoder instance to be embedded in a struct drm_slave_encoder. This makes processing encoders regardless of their types needlessly and painfully complex in drivers that use a mix of slave encoders and custom encoders. Such a driver will need to either create drm_slave_encoder instances that fake their embedded encoder instance, or to turn all drm_encoder instances into drm_slave_encoder instances. Between the two evils, one must choose the lesser. Use drm_slave_encoder everywhere. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h index c6334b4280d9..c4dccdbcff33 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h @@ -15,6 +15,7 @@ #define __RCAR_DU_ENCODER_H__ #include <drm/drm_crtc.h> +#include <drm/drm_encoder_slave.h> struct rcar_du_device; struct rcar_du_lvdsenc; @@ -27,15 +28,15 @@ enum rcar_du_encoder_type { }; struct rcar_du_encoder { - struct drm_encoder encoder; + struct drm_encoder_slave slave; enum rcar_du_output output; struct rcar_du_lvdsenc *lvds; }; #define to_rcar_encoder(e) \ - container_of(e, struct rcar_du_encoder, encoder) + container_of(e, struct rcar_du_encoder, slave.base) -#define rcar_encoder_to_drm_encoder(e) (&(e)->encoder) +#define rcar_encoder_to_drm_encoder(e) (&(e)->slave.base) struct rcar_du_connector { struct drm_connector connector; -- 2.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: linux-sh@vger.kernel.org Subject: [PATCH v3 4/9] drm: rcar-du: Replace drm_encoder with drm_slave_encoder Date: Sun, 26 Oct 2014 17:24:23 +0200 [thread overview] Message-ID: <1414337068-28664-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1414337068-28664-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> DRM slave encoders require their associated struct drm_encoder instance to be embedded in a struct drm_slave_encoder. This makes processing encoders regardless of their types needlessly and painfully complex in drivers that use a mix of slave encoders and custom encoders. Such a driver will need to either create drm_slave_encoder instances that fake their embedded encoder instance, or to turn all drm_encoder instances into drm_slave_encoder instances. Between the two evils, one must choose the lesser. Use drm_slave_encoder everywhere. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h index c6334b4280d9..c4dccdbcff33 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h @@ -15,6 +15,7 @@ #define __RCAR_DU_ENCODER_H__ #include <drm/drm_crtc.h> +#include <drm/drm_encoder_slave.h> struct rcar_du_device; struct rcar_du_lvdsenc; @@ -27,15 +28,15 @@ enum rcar_du_encoder_type { }; struct rcar_du_encoder { - struct drm_encoder encoder; + struct drm_encoder_slave slave; enum rcar_du_output output; struct rcar_du_lvdsenc *lvds; }; #define to_rcar_encoder(e) \ - container_of(e, struct rcar_du_encoder, encoder) + container_of(e, struct rcar_du_encoder, slave.base) -#define rcar_encoder_to_drm_encoder(e) (&(e)->encoder) +#define rcar_encoder_to_drm_encoder(e) (&(e)->slave.base) struct rcar_du_connector { struct drm_connector connector; -- 2.0.4
next prev parent reply other threads:[~2014-10-26 15:24 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-26 15:24 [PATCH v3 0/9] Renesas R-Car DU HDMI support Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 1/9] drm: rcar-du: Remove platform data support Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 2/9] drm: rcar-du: Pass the encoder DT node to rcar_du_encoder_init() Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 3/9] drm: rcar-du: Replace direct DRM encoder access with cast macro Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart [this message] 2014-10-26 15:24 ` [PATCH v3 4/9] drm: rcar-du: Replace drm_encoder with drm_slave_encoder Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 5/9] drm: rcar-du: Add HDMI encoder and connector support Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 6/9] drm: Decouple EDID parsing from I2C adapter Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-11-25 23:47 ` [PATCH v4 " Laurent Pinchart 2014-11-25 23:47 ` Laurent Pinchart 2014-11-26 0:38 ` Rob Clark 2014-11-26 0:38 ` Rob Clark 2014-11-26 19:06 ` Laurent Pinchart 2014-11-26 19:06 ` Laurent Pinchart 2014-11-26 7:28 ` Daniel Vetter 2014-11-26 7:28 ` Daniel Vetter 2014-10-26 15:24 ` [PATCH v3 7/9] video: Add ADV751[13] DT bindings documentation Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 8/9] drm: Add adv7511 encoder driver Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-26 15:24 ` [PATCH v3 9/9] ARM: shmobile: koelsch: Add DU HDMI output support Laurent Pinchart 2014-10-26 15:24 ` Laurent Pinchart 2014-10-28 5:30 ` [PATCH v3 0/9] Renesas R-Car DU HDMI support Dave Airlie 2014-10-28 5:30 ` Dave Airlie 2014-10-30 11:05 ` Laurent Pinchart 2014-10-30 11:05 ` Laurent Pinchart 2014-10-30 11:29 ` Simon Horman 2014-10-30 11:40 ` Laurent Pinchart 2014-10-30 11:40 ` Laurent Pinchart 2014-10-31 8:18 ` Simon Horman 2014-10-31 8:18 ` Simon Horman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1414337068-28664-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com \ --to=laurent.pinchart+renesas@ideasonboard.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-sh@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.