diff mbox

[1/6] drm/i915: add attached connector to hdmi container

Message ID 1441373176-22302-2-git-send-email-sonika.jindal@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sonika.jindal@intel.com Sept. 4, 2015, 1:26 p.m. UTC
From: Shashank Sharma <shashank.sharma@intel.com>

This patch adds the intel_connector initialized to intel_hdmi
display, during the init phase, just like the other encoders do.
This attachment is very useful when we need to extract the connector
pointer during the hotplug handler function

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h  |    1 +
 drivers/gpu/drm/i915/intel_hdmi.c |    1 +
 2 files changed, 2 insertions(+)

Comments

Rodrigo Vivi Sept. 9, 2015, 6:54 p.m. UTC | #1
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

On Fri, Sep 4, 2015 at 6:37 AM Sonika Jindal <sonika.jindal@intel.com>
wrote:

> From: Shashank Sharma <shashank.sharma@intel.com>
>
> This patch adds the intel_connector initialized to intel_hdmi
> display, during the init phase, just like the other encoders do.
> This attachment is very useful when we need to extract the connector
> pointer during the hotplug handler function
>
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_drv.h  |    1 +
>  drivers/gpu/drm/i915/intel_hdmi.c |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h
> b/drivers/gpu/drm/i915/intel_drv.h
> index c61ba47..b6c2c20 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -667,6 +667,7 @@ struct intel_hdmi {
>         enum hdmi_force_audio force_audio;
>         bool rgb_quant_range_selectable;
>         enum hdmi_picture_aspect aspect_ratio;
> +       struct intel_connector *attached_connector;
>         void (*write_infoframe)(struct drm_encoder *encoder,
>                                 enum hdmi_infoframe_type type,
>                                 const void *frame, ssize_t len);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> b/drivers/gpu/drm/i915/intel_hdmi.c
> index ed25f64..5bdb386 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -2107,6 +2107,7 @@ void intel_hdmi_init_connector(struct
> intel_digital_port *intel_dig_port,
>
>         intel_connector_attach_encoder(intel_connector, intel_encoder);
>         drm_connector_register(connector);
> +       intel_hdmi->attached_connector = intel_connector;
>
>         /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be
> written
>          * 0xd.  Failure to do so will result in spurious interrupts being
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
Daniel Vetter Sept. 10, 2015, 3:24 p.m. UTC | #2
On Wed, Sep 09, 2015 at 06:54:17PM +0000, Rodrigo Vivi wrote:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> On Fri, Sep 4, 2015 at 6:37 AM Sonika Jindal <sonika.jindal@intel.com>
> wrote:
> 
> > From: Shashank Sharma <shashank.sharma@intel.com>
> >
> > This patch adds the intel_connector initialized to intel_hdmi
> > display, during the init phase, just like the other encoders do.
> > This attachment is very useful when we need to extract the connector
> > pointer during the hotplug handler function
> >
> > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> > ---
> >  drivers/gpu/drm/i915/intel_drv.h  |    1 +
> >  drivers/gpu/drm/i915/intel_hdmi.c |    1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index c61ba47..b6c2c20 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -667,6 +667,7 @@ struct intel_hdmi {
> >         enum hdmi_force_audio force_audio;
> >         bool rgb_quant_range_selectable;
> >         enum hdmi_picture_aspect aspect_ratio;
> > +       struct intel_connector *attached_connector;
> >         void (*write_infoframe)(struct drm_encoder *encoder,
> >                                 enum hdmi_infoframe_type type,
> >                                 const void *frame, ssize_t len);
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> > b/drivers/gpu/drm/i915/intel_hdmi.c
> > index ed25f64..5bdb386 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -2107,6 +2107,7 @@ void intel_hdmi_init_connector(struct
> > intel_digital_port *intel_dig_port,
> >
> >         intel_connector_attach_encoder(intel_connector, intel_encoder);
> >         drm_connector_register(connector);
> > +       intel_hdmi->attached_connector = intel_connector;
> >
> >         /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be
> > written
> >          * 0xd.  Failure to do so will result in spurious interrupts being
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index c61ba47..b6c2c20 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -667,6 +667,7 @@  struct intel_hdmi {
 	enum hdmi_force_audio force_audio;
 	bool rgb_quant_range_selectable;
 	enum hdmi_picture_aspect aspect_ratio;
+	struct intel_connector *attached_connector;
 	void (*write_infoframe)(struct drm_encoder *encoder,
 				enum hdmi_infoframe_type type,
 				const void *frame, ssize_t len);
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index ed25f64..5bdb386 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2107,6 +2107,7 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 
 	intel_connector_attach_encoder(intel_connector, intel_encoder);
 	drm_connector_register(connector);
+	intel_hdmi->attached_connector = intel_connector;
 
 	/* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written
 	 * 0xd.  Failure to do so will result in spurious interrupts being