From: Daniel Vetter <daniel@ffwll.ch>
To: Eugeni Dodonov <eugeni.dodonov@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 23/25] drm/i915: move HDMI structs to shared location
Date: Thu, 10 May 2012 00:05:31 +0200 [thread overview]
Message-ID: <20120509220531.GG4963@phenom.ffwll.local> (raw)
In-Reply-To: <1336588652-702-24-git-send-email-eugeni.dodonov@intel.com>
On Wed, May 09, 2012 at 03:37:30PM -0300, Eugeni Dodonov wrote:
> Move intel_hdmi data structure and support functions to a shared location,
> to allow their usage from intel_ddi module.
>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
> ---
> drivers/gpu/drm/i915/intel_drv.h | 19 ++++++++++++++++++-
> drivers/gpu/drm/i915/intel_hdmi.c | 19 +++----------------
> 2 files changed, 21 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index fd96ffb..afdd74f 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -290,6 +290,19 @@ struct dip_infoframe {
> } __attribute__ ((packed)) body;
> } __attribute__((packed));
>
> +struct intel_hdmi {
> + struct intel_encoder base;
> + u32 sdvox_reg;
> + int ddc_bus;
> + int ddi_port;
> + uint32_t color_range;
> + bool has_hdmi_sink;
> + bool has_audio;
> + enum hdmi_force_audio force_audio;
> + void (*write_infoframe)(struct drm_encoder *encoder,
> + struct dip_infoframe *frame);
> +};
I do wonder whether we shouldn't create an intel_digital_encoder struct to
control all this funny infoframe writing, many of the flags in there (like
has_hdmi_sink, has_audio) and similar stuff.
But I guess that can wait until we have working infoframe support on
display ports and working display port on ddi links. When that all landed
we should see much clearer how to best structure the code.
-Daniel
> +
> static inline struct drm_crtc *
> intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
> {
> @@ -329,7 +342,11 @@ extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector)
>
> extern void intel_crt_init(struct drm_device *dev);
> extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg);
> -void intel_dip_infoframe_csum(struct dip_infoframe *avi_if);
> +extern struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder);
> +extern void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
> + struct drm_display_mode *adjusted_mode);
> +extern void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder);
> +extern void intel_dip_infoframe_csum(struct dip_infoframe *avi_if);
> extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg,
> bool is_sdvob);
> extern void intel_dvo_init(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 251ed22..77c92fb 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -37,20 +37,7 @@
> #include "i915_drm.h"
> #include "i915_drv.h"
>
> -struct intel_hdmi {
> - struct intel_encoder base;
> - u32 sdvox_reg;
> - int ddc_bus;
> - int ddi_port;
> - uint32_t color_range;
> - bool has_hdmi_sink;
> - bool has_audio;
> - enum hdmi_force_audio force_audio;
> - void (*write_infoframe)(struct drm_encoder *encoder,
> - struct dip_infoframe *frame);
> -};
> -
> -static struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
> +struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
> {
> return container_of(encoder, struct intel_hdmi, base.base);
> }
> @@ -354,7 +341,7 @@ static void intel_set_infoframe(struct drm_encoder *encoder,
> intel_hdmi->write_infoframe(encoder, frame);
> }
>
> -static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
> +void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
> struct drm_display_mode *adjusted_mode)
> {
> struct dip_infoframe avi_if = {
> @@ -369,7 +356,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
> intel_set_infoframe(encoder, &avi_if);
> }
>
> -static void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
> +void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
> {
> struct dip_infoframe spd_if;
>
> --
> 1.7.10
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-05-09 22:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 18:37 [PATCH 00/25] Haswell fixes Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 01/25] drm/i915: add new Haswell DIP controls registers Eugeni Dodonov
2012-05-10 0:34 ` Paulo Zanoni
2012-05-10 1:02 ` Eugeni Dodonov
2012-05-10 3:03 ` Paulo Zanoni
2012-05-10 8:32 ` Daniel Vetter
2012-05-10 13:18 ` Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 02/25] drm/i915: reuse Ivy Bridge interrupts code for Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 03/25] drm/i915: add support for SBI ops Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 04/25] drm/i915: calculate watermarks for devices that have 3 pipes Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 05/25] drm/i915: properly check for pipe count Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 06/25] drm/i915: show unknown sdvox registers on hdmi init Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 07/25] drm/i915: do not use fdi_normal_train on Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 08/25] drm/i915: detect PCH encoders " Eugeni Dodonov
2012-05-09 21:46 ` Daniel Vetter
2012-05-09 23:30 ` Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 09/25] drm/i915: enable power wells on Haswell init Eugeni Dodonov
2012-05-09 21:42 ` Daniel Vetter
2012-05-09 23:29 ` Eugeni Dodonov
2012-05-10 14:48 ` Daniel Vetter
2012-05-10 15:08 ` Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 10/25] drm/i915: add LPT PCH checks Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 11/25] drm/i915: handle DDI-related assertions Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 12/25] drm/i915: account for only one PCH receiver on Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 13/25] drm/i915: initialize DDI buffer translations Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 14/25] drm/i915: support DDI training in FDI mode Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 15/25] drm/i915: use ironlake eld write routine for Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 16/25] drm/i915: define Haswell watermarks and clock gating Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 17/25] drm/i915: program WM_LINETIME on Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 18/25] drm/i915: disable pipe DDI function when disabling pipe Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 19/25] drm/i915: program iCLKIP on Lynx Point Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 20/25] drm/i915: detect digital outputs on Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 21/25] drm/i915: add support for DDI-controlled digital outputs Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 22/25] drm/i915: add WR PLL programming table Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 23/25] drm/i915: move HDMI structs to shared location Eugeni Dodonov
2012-05-09 22:05 ` Daniel Vetter [this message]
2012-05-09 18:37 ` [PATCH 24/25] drm/i915: prepare HDMI link for Haswell Eugeni Dodonov
2012-05-09 18:37 ` [PATCH 25/25] drm/i915: hook Haswell devices in place Eugeni Dodonov
2012-05-10 15:56 ` Daniel Vetter
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=20120509220531.GG4963@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=eugeni.dodonov@intel.com \
--cc=intel-gfx@lists.freedesktop.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox