From: przanoni@gmail.com
To: intel-gfx@lists.freedesktop.org
Cc: stable@kernel.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH] drm/i915: set the right SDVO transcoder for CPT
Date: Thu, 13 Oct 2011 14:41:38 -0300 [thread overview]
Message-ID: <1318527698-3408-1-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1318510159-12913-1-git-send-email-przanoni@gmail.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
Fixes fd.o #41272
v2: add a CPT-specific macro, make code cleaner
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 8 ++++----
drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 138eae1..e02b64c 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3275,10 +3275,10 @@
/* or SDVOB */
#define HDMIB 0xe1140
#define PORT_ENABLE (1 << 31)
-#define TRANSCODER_A (0)
-#define TRANSCODER_B (1 << 30)
-#define TRANSCODER(pipe) ((pipe) << 30)
-#define TRANSCODER_MASK (1 << 30)
+#define TRANSCODER(pipe) ((pipe) << 30)
+#define TRANSCODER_CPT(pipe) ((pipe) << 29)
+#define TRANSCODER_MASK (1 << 30)
+#define TRANSCODER_MASK_CPT (3 << 29)
#define COLOR_FORMAT_8bpc (0)
#define COLOR_FORMAT_12bpc (3 << 26)
#define SDVOB_HOTPLUG_ENABLE (1 << 23)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index aa94110..85fc976 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1080,8 +1080,12 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
}
sdvox |= (9 << 19) | SDVO_BORDER_ENABLE;
}
- if (intel_crtc->pipe == 1)
- sdvox |= SDVO_PIPE_B_SELECT;
+
+ if (INTEL_PCH_TYPE(dev) >= PCH_CPT)
+ sdvox |= TRANSCODER_CPT(intel_crtc->pipe);
+ else
+ sdvox |= TRANSCODER(intel_crtc->pipe);
+
if (intel_sdvo->has_hdmi_audio)
sdvox |= SDVO_AUDIO_ENABLE;
--
1.7.6.3
next prev parent reply other threads:[~2011-10-13 17:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 12:49 [PATCH] drm/i915: set the right SDVO transcoder for CPT przanoni
2011-10-13 13:38 ` Adam Jackson
2011-10-13 13:51 ` Chris Wilson
2011-10-13 17:41 ` przanoni [this message]
2011-10-13 20:39 ` Chris Wilson
2011-10-14 21:16 ` [PATCH 1/3] " przanoni
2011-10-14 21:30 ` Chris Wilson
2011-10-24 19:34 ` Paulo Zanoni
2011-10-14 21:17 ` [PATCH 2/3] drm/i915: Rename HDMI register field definitions przanoni
2011-10-14 21:39 ` Chris Wilson
2011-10-17 19:04 ` Paulo Zanoni
2011-10-14 21:17 ` [PATCH 3/3] drm/i915: add PCH info to i915_capabilities przanoni
2011-10-14 21:34 ` Chris Wilson
2011-10-24 19:44 ` Paulo Zanoni
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=1318527698-3408-1-git-send-email-przanoni@gmail.com \
--to=przanoni@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=stable@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: link
Be 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.