Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
- Loading branch information
Showing
10 changed files
with
195 additions
and
14 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0001-video-Add-generic-HDMI-infoframe-helpers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0002-BeagleBone-Black-TDA998x-Initial-HDMI-Audio-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
patches/hdmi/0003-Clean-up-some-formating-and-debug-in-Davinci-MCASP-d.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0004-tilcdc-Prune-modes-that-can-t-support-audio.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0005-Enable-output-of-correct-AVI-Infoframe-type-hdmi.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0006-drm-am335x-add-support-for-2048-lines-vertical.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
patches/hdmi/0007-drm-tda998x-Adding-extra-CEA-mode-for-1920x1080-24.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
patches/hdmi/0008-tilcdc-Remove-superfluous-newlines-from-DBG-messages.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
From f392231247dfcd14be688e572c84da9573fd1454 Mon Sep 17 00:00:00 2001 | ||
From: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
Date: Mon, 20 May 2013 13:54:21 +0300 | ||
Subject: [PATCH 08/10] tilcdc: Remove superfluous newlines from DBG messages | ||
|
||
DBGs supply their own newlines, don't add them. | ||
|
||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
--- | ||
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 14 +++++++------- | ||
1 file changed, 7 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
index 966b59b..900c710 100644 | ||
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
@@ -469,7 +469,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, | ||
is_cea_mode ? "true" : "false"); | ||
|
||
if (audio && has_audio && !is_cea_mode) { | ||
- DBG("Pruning mode : Does not support audio\n"); | ||
+ DBG("Pruning mode : Does not support audio"); | ||
return MODE_BAD; | ||
} | ||
|
||
@@ -481,32 +481,32 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, | ||
vsw = mode->vsync_end - mode->vsync_start; | ||
|
||
if (hbp & ~0x3ff) { | ||
- DBG("Pruning mode : Horizontal Back Porch out of range\n"); | ||
+ DBG("Pruning mode : Horizontal Back Porch out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
if (hfp & ~0x3ff) { | ||
- DBG("Pruning mode : Horizontal Front Porch out of range\n"); | ||
+ DBG("Pruning mode : Horizontal Front Porch out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
if (hsw & ~0x3ff) { | ||
- DBG("Pruning mode : Horizontal Sync Width out of range\n"); | ||
+ DBG("Pruning mode : Horizontal Sync Width out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
if (vbp & ~0xff) { | ||
- DBG("Pruning mode : Vertical Back Porch out of range\n"); | ||
+ DBG("Pruning mode : Vertical Back Porch out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
if (vfp & ~0xff) { | ||
- DBG("Pruning mode : Vertical Front Porch out of range\n"); | ||
+ DBG("Pruning mode : Vertical Front Porch out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
if (vsw & ~0x3f) { | ||
- DBG("Pruning mode : Vertical Sync Width out of range\n"); | ||
+ DBG("Pruning mode : Vertical Sync Width out of range"); | ||
return MODE_BAD; | ||
} | ||
|
||
-- | ||
1.8.1.4 | ||
|
47 changes: 47 additions & 0 deletions
47
patches/hdmi/0009-tilcdc-1280x1024x60-bw-1920x1080x24-bw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 166a5e83b56f5e1d99b64835b29fd872ceff42ab Mon Sep 17 00:00:00 2001 | ||
From: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
Date: Mon, 20 May 2013 15:16:55 +0300 | ||
Subject: [PATCH 09/10] tilcdc: 1280x1024x60 bw > 1920x1080x24 bw | ||
|
||
The lower resolution modes do infact need more bandwidth. | ||
|
||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
--- | ||
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- | ||
drivers/gpu/drm/tilcdc/tilcdc_drv.h | 5 +++-- | ||
2 files changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
index 900c710..c86da03 100644 | ||
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
@@ -468,7 +468,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, | ||
has_audio ? "true" : "false", | ||
is_cea_mode ? "true" : "false"); | ||
|
||
- if (audio && has_audio && !is_cea_mode) { | ||
+ if (edid && audio && has_audio && !is_cea_mode) { | ||
DBG("Pruning mode : Does not support audio"); | ||
return MODE_BAD; | ||
} | ||
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
index 6b2c7ea..f3861e4 100644 | ||
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
@@ -40,10 +40,11 @@ | ||
#define TILCDC_DEFAULT_MAX_WIDTH 2048 | ||
/* | ||
* This may need some tweaking, but want to allow at least 1280x1024@60 | ||
- * with optimized DDR & EMIF settings tweaked 1920x1080@24 appears to | ||
+ * with optimized DDR & EMIF settings tweaked 1920x1080@25 appears to | ||
* be supportable | ||
+ * Note: 1920x1080x25=49766400 < 1280x1024x60=78643200 | ||
*/ | ||
-#define TILCDC_DEFAULT_MAX_BANDWIDTH (1920*1080*25) | ||
+#define TILCDC_DEFAULT_MAX_BANDWIDTH (1280*1024*60) | ||
|
||
struct tilcdc_drm_private { | ||
void __iomem *mmio; | ||
-- | ||
1.8.1.4 | ||
|
66 changes: 66 additions & 0 deletions
66
patches/hdmi/0010-tilcdc-Only-support-Audio-on-50-60-Hz-modes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
From 378bab743b7f9c5084e4c4b49f57d1b3d53a7e08 Mon Sep 17 00:00:00 2001 | ||
From: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
Date: Mon, 20 May 2013 16:01:07 +0300 | ||
Subject: [PATCH 10/10] tilcdc: Only support Audio on 50 & 60 Hz modes | ||
|
||
Apparently anything other fails to work (at least for me). | ||
|
||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> | ||
--- | ||
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20 ++++++++++++++------ | ||
1 file changed, 14 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
index c86da03..779f31f 100644 | ||
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
@@ -310,7 +310,7 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, | ||
reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; | ||
|
||
tilcdc_write(dev, LCDC_RASTER_TIMING_0_REG, reg); | ||
- | ||
+ | ||
/* only the vertical sync width maps 0 as 1 so only subtract 1 from vsw */ | ||
reg = ((mode->vdisplay - 1) & 0x3ff) | | ||
((vbp & 0xff) << 24) | | ||
@@ -440,7 +440,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, | ||
struct tilcdc_drm_private *priv = crtc->dev->dev_private; | ||
unsigned int bandwidth; | ||
uint32_t hbp, hfp, hsw, vbp, vfp, vsw; | ||
- int has_audio, is_cea_mode; | ||
+ int has_audio, is_cea_mode, can_output_audio, refresh; | ||
|
||
int rb; | ||
|
||
@@ -459,16 +459,24 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, | ||
/* set if there's audio capability */ | ||
has_audio = edid && drm_detect_monitor_audio(edid); | ||
|
||
+ /* only 50 & 60Hz modes reliably support audio */ | ||
+ refresh = drm_mode_vrefresh(mode); | ||
+ | ||
/* set if it's a cea mode */ | ||
is_cea_mode = drm_match_cea_mode(mode) > 0; | ||
|
||
- DBG("mode %dx%d@%d pixel-clock %d audio %s cea %s", | ||
- mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), | ||
+ /* set if we can output audio */ | ||
+ can_output_audio = edid && has_audio && is_cea_mode && | ||
+ (refresh == 50 || refresh == 60); | ||
+ | ||
+ DBG("mode %dx%d@%d pixel-clock %d audio %s cea %s can_output %s", | ||
+ mode->hdisplay, mode->vdisplay,refresh, | ||
mode->clock, | ||
has_audio ? "true" : "false", | ||
- is_cea_mode ? "true" : "false"); | ||
+ is_cea_mode ? "true" : "false", | ||
+ can_output_audio ? "true" : "false" ); | ||
|
||
- if (edid && audio && has_audio && !is_cea_mode) { | ||
+ if (edid && has_audio && !can_output_audio) { | ||
DBG("Pruning mode : Does not support audio"); | ||
return MODE_BAD; | ||
} | ||
-- | ||
1.8.1.4 | ||
|