* [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation
@ 2013-08-05 20:25 Paulo Zanoni
2013-08-05 20:25 ` [PATCH 2/2] drm/i915: remove use_fdi_mode argument from intel_prepare_ddi_buffers Paulo Zanoni
2013-08-05 20:43 ` [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Chris Wilson
0 siblings, 2 replies; 5+ messages in thread
From: Paulo Zanoni @ 2013-08-05 20:25 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
These messages are not really useful since it's very easy to check
which mode is used for each port.
Also, when we add the code to enable/disable PC8+,
intel_prepare_ddi_buffers will be called more often and will eat your
dmesg buffers.
While at it, fix the coding style of the "for" statement above.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_ddi.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b361c08..b6281d9 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -94,15 +94,8 @@ static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port,
hsw_ddi_translations_fdi :
hsw_ddi_translations_dp);
- DRM_DEBUG_DRIVER("Initializing DDI buffers for port %c in %s mode\n",
- port_name(port),
- use_fdi_mode ? "FDI" : "DP");
-
- WARN((use_fdi_mode && (port != PORT_E)),
- "Programming port %c in FDI mode, this probably will not work.\n",
- port_name(port));
-
- for (i=0, reg=DDI_BUF_TRANS(port); i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
+ for (i = 0, reg = DDI_BUF_TRANS(port);
+ i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
I915_WRITE(reg, ddi_translations[i]);
reg += 4;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/i915: remove use_fdi_mode argument from intel_prepare_ddi_buffers
2013-08-05 20:25 [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Paulo Zanoni
@ 2013-08-05 20:25 ` Paulo Zanoni
2013-08-05 20:43 ` [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Chris Wilson
1 sibling, 0 replies; 5+ messages in thread
From: Paulo Zanoni @ 2013-08-05 20:25 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
We set the mode based on the port, and we already pass the port as an
argument.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_ddi.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b6281d9..b8c096b 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -84,15 +84,14 @@ static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
* in either FDI or DP modes only, as HDMI connections will work with both
* of those
*/
-static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port,
- bool use_fdi_mode)
+static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg;
int i;
- const u32 *ddi_translations = ((use_fdi_mode) ?
+ const u32 *ddi_translations = (port == PORT_E) ?
hsw_ddi_translations_fdi :
- hsw_ddi_translations_dp);
+ hsw_ddi_translations_dp;
for (i = 0, reg = DDI_BUF_TRANS(port);
i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
@@ -111,14 +110,8 @@ void intel_prepare_ddi(struct drm_device *dev)
if (!HAS_DDI(dev))
return;
- for (port = PORT_A; port < PORT_E; port++)
- intel_prepare_ddi_buffers(dev, port, false);
-
- /* DDI E is the suggested one to work in FDI mode, so program is as such
- * by default. It will have to be re-programmed in case a digital DP
- * output will be detected on it
- */
- intel_prepare_ddi_buffers(dev, PORT_E, true);
+ for (port = PORT_A; port <= PORT_E; port++)
+ intel_prepare_ddi_buffers(dev, port);
}
static const long hsw_ddi_buf_ctl_values[] = {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation
2013-08-05 20:25 [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Paulo Zanoni
2013-08-05 20:25 ` [PATCH 2/2] drm/i915: remove use_fdi_mode argument from intel_prepare_ddi_buffers Paulo Zanoni
@ 2013-08-05 20:43 ` Chris Wilson
2013-08-05 21:02 ` Paulo Zanoni
1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2013-08-05 20:43 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Mon, Aug 05, 2013 at 05:25:55PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> These messages are not really useful since it's very easy to check
> which mode is used for each port.
>
For those following along at home, a quick explanation of what to look
for instead would be very useful.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation
2013-08-05 20:43 ` [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Chris Wilson
@ 2013-08-05 21:02 ` Paulo Zanoni
2013-08-06 6:34 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Paulo Zanoni @ 2013-08-05 21:02 UTC (permalink / raw)
To: Chris Wilson, Paulo Zanoni, intel-gfx, Paulo Zanoni
2013/8/5 Chris Wilson <chris@chris-wilson.co.uk>:
> On Mon, Aug 05, 2013 at 05:25:55PM -0300, Paulo Zanoni wrote:
>> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>>
>> These messages are not really useful since it's very easy to check
>> which mode is used for each port.
>>
> For those following along at home, a quick explanation of what to look
> for instead would be very useful.
The values programmed are based on the port type, then assigned to the
ddi_translations variable. Currently we use DP mode for ports A-D and
FDI mode for port E.
Daniel, should I resend with the sentence above or can you add it
if/when applying the patch?
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Paulo Zanoni
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation
2013-08-05 21:02 ` Paulo Zanoni
@ 2013-08-06 6:34 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2013-08-06 6:34 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Mon, Aug 05, 2013 at 06:02:32PM -0300, Paulo Zanoni wrote:
> 2013/8/5 Chris Wilson <chris@chris-wilson.co.uk>:
> > On Mon, Aug 05, 2013 at 05:25:55PM -0300, Paulo Zanoni wrote:
> >> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >>
> >> These messages are not really useful since it's very easy to check
> >> which mode is used for each port.
> >>
> > For those following along at home, a quick explanation of what to look
> > for instead would be very useful.
>
> The values programmed are based on the port type, then assigned to the
> ddi_translations variable. Currently we use DP mode for ports A-D and
> FDI mode for port E.
>
> Daniel, should I resend with the sentence above or can you add it
> if/when applying the patch?
Both patches merged to dinq with the pimped commit message for this one.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-06 6:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 20:25 [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Paulo Zanoni
2013-08-05 20:25 ` [PATCH 2/2] drm/i915: remove use_fdi_mode argument from intel_prepare_ddi_buffers Paulo Zanoni
2013-08-05 20:43 ` [PATCH 1/2] drm/i915: silence useless messages about DDI buffer translation Chris Wilson
2013-08-05 21:02 ` Paulo Zanoni
2013-08-06 6:34 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).