diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-03-31 01:52:01 +0200 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-12-11 10:37:19 +0900 |
commit | 85fdd22b925c5acf64b9886f6af61e399fc79900 (patch) | |
tree | b67cf06a0d1431b92cdaf27c7f6fba2b33cdb8c9 | |
parent | b180a22249ed79e4a99521dcc6b62cff52833926 (diff) | |
download | renesas_kernel-85fdd22b925c5acf64b9886f6af61e399fc79900.tar.gz renesas_kernel-85fdd22b925c5acf64b9886f6af61e399fc79900.tar.bz2 renesas_kernel-85fdd22b925c5acf64b9886f6af61e399fc79900.zip |
drm: rcar-du: Replace drm_encoder with drm_slave_encoder
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>
(cherry picked from commit 69746b4112e3c83442c1df59b7011ab3c5ed2d5a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 7 |
1 files 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 c6334b4280d..c4dccdbcff3 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; |