drm: rcar-du: Pass the encoder DT node to rcar_du_encoder_init()
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 17 Sep 2014 11:41:57 +0000 (14:41 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 26 Nov 2014 18:09:37 +0000 (20:09 +0200)
The encoder DT node will be needed to register an external HDMI encoder.
Pass it to the rcar_du_encoder_init() function to prepare for HDMI
support.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_encoder.c
drivers/gpu/drm/rcar-du/rcar_du_encoder.h
drivers/gpu/drm/rcar-du/rcar_du_kms.c

index 89ed4a929f7b40e6b66ac975c8fa9e3345856e49..c699100a13593703f37fa17a6957b81a7aaf598f 100644 (file)
@@ -142,7 +142,8 @@ static const struct drm_encoder_funcs encoder_funcs = {
 int rcar_du_encoder_init(struct rcar_du_device *rcdu,
                         enum rcar_du_encoder_type type,
                         enum rcar_du_output output,
-                        struct device_node *np)
+                        struct device_node *enc_node,
+                        struct device_node *con_node)
 {
        struct rcar_du_encoder *renc;
        unsigned int encoder_type;
@@ -190,7 +191,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
 
        switch (encoder_type) {
        case DRM_MODE_ENCODER_LVDS:
-               return rcar_du_lvds_connector_init(rcdu, renc, np);
+               return rcar_du_lvds_connector_init(rcdu, renc, con_node);
 
        case DRM_MODE_ENCODER_DAC:
                return rcar_du_vga_connector_init(rcdu, renc);
index c37ed9499542c3b3e20f77e457d92a7922e80302..4b906b90c204f0c90ed2f061a3cbb64459371638 100644 (file)
@@ -49,6 +49,7 @@ rcar_du_connector_best_encoder(struct drm_connector *connector);
 int rcar_du_encoder_init(struct rcar_du_device *rcdu,
                         enum rcar_du_encoder_type type,
                         enum rcar_du_output output,
-                        struct device_node *np);
+                        struct device_node *enc_node,
+                        struct device_node *con_node);
 
 #endif /* __RCAR_DU_ENCODER_H__ */
index 704827269a2e693c97811b711581f9390e6d51c5..543fa8bde616d47788dd800f2a4b8c0be335198f 100644 (file)
@@ -289,7 +289,7 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
                connector = entity;
        }
 
-       ret = rcar_du_encoder_init(rcdu, enc_type, output, connector);
+       ret = rcar_du_encoder_init(rcdu, enc_type, output, encoder, connector);
        of_node_put(encoder);
        of_node_put(connector);