Xavier Bachelot wrote:
> Hi,
>
> Please find attached 2 patches adding VX855 support. This is based on
> work from Harald Welte, as well as Chris Ball and Mitch Bradley from the
> OLPC team.
>
> First patch (vx855_support.patch) adds the VX855 to the logic of the
> driver. I've checked this one already, it should be good to go.
> Second patch (pll_rework.patch) brings in working VX855 dot clock.
> That's the one that need to be reviewed more carefully. It reworks the
> UniChromePro clock setting such that the SetDotclock() functions get
> access to a full set of parameters for each clock value, rather than one
> value for the PLLs for <VX855 and one for VX855.
>
> FWIW,I've tested this on both a CLE266 (unichrome dotclock) and a VX800
> (unichrome pro dotclock), so I believe this doesn't introduce regressions.
>
I've committed the 2 patches (rev 756 and 757).
> Also, Chris will provide one more patch to add support for the XO-1.5
> panel soonish.
>
Here's the missing panel patch, extracted from a big OLPC patch also
including the 2 above patches.
With this patch included on top of trunk, the XO-1.5 should work out of
the box. This patch as not yet been committed.
Notably missing is VX855 Xv support and VX855 DMA blit support. DMA blit
patch is useless w/o Chrome9 DRM, but can be included. The Xv patch is
not enough and is reported not to work, it's only there as a
placeholder, waiting for the missing bits to be added.
Regards,
Xavier
Index: src/via_video.c
===================================================================
--- src/via_video.c (revision 758)
+++ src/via_video.c (working copy)
@@ -565,17 +565,21 @@ viaInitVideo(ScreenPtr pScreen)
pVia->useDmaBlit = FALSE;
#ifdef XF86DRI
- pVia->useDmaBlit = pVia->directRenderingEnabled &&
- ((pVia->Chipset == VIA_CLE266) ||
- (pVia->Chipset == VIA_KM400) ||
- (pVia->Chipset == VIA_K8M800) ||
- (pVia->Chipset == VIA_PM800) ||
- (pVia->Chipset == VIA_VM800) ||
- (pVia->Chipset == VIA_K8M890) ||
- (pVia->Chipset == VIA_P4M900) ||
- (pVia->Chipset == VIA_CX700) ||
- (pVia->Chipset == VIA_VX800) ||
- (pVia->Chipset == VIA_P4M890));
+ switch (pVia->Chipset) {
+ case VIA_CLE266:
+ case VIA_KM400:
+ case VIA_K8M800:
+ case VIA_PM800:
+ case VIA_VM800:
+ case VIA_P4M890:
+ case VIA_CX700:
+ case VIA_K8M890:
+ case VIA_P4M900:
+ case VIA_VX800:
+ case VIA_VX855:
+ pVia->useDmaBlit = pVia->directRenderingEnabled;
+ break;
+ }
if ((pVia->drmVerMajor < 2) ||
((pVia->drmVerMajor == 2) && (pVia->drmVerMinor < 9)))
pVia->useDmaBlit = FALSE;
Index: src/via_video.c
===================================================================
--- src/via_video.c (revision 758)
+++ src/via_video.c (working copy)
@@ -589,18 +589,27 @@ viaInitVideo(ScreenPtr pScreen)
if (!viaFastVidCpy)
viaFastVidCpy = viaVidCopyInit("video", pScreen);
- if ((pVia->Chipset == VIA_CLE266) || (pVia->Chipset == VIA_KM400) ||
- (pVia->Chipset == VIA_K8M800) || (pVia->Chipset == VIA_PM800) ||
- (pVia->Chipset == VIA_VM800) || (pVia->Chipset == VIA_K8M890) ||
- (pVia->Chipset == VIA_P4M900) || (pVia->Chipset == VIA_CX700) ||
- (pVia->Chipset == VIA_P4M890) || (pVia->Chipset == VIA_VX800)) {
- num_new = viaSetupAdaptors(pScreen, &newAdaptors);
- num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "[Xv] Unsupported Chipset. X video functionality disabled.\n");
- num_adaptors = 0;
- memset(viaAdaptPtr, 0, sizeof(viaAdaptPtr));
+ switch (pVia->Chipset) {
+ case VIA_CLE266:
+ case VIA_KM400:
+ case VIA_K8M800:
+ case VIA_PM800:
+ case VIA_VM800:
+ case VIA_P4M890:
+ case VIA_CX700:
+ case VIA_K8M890:
+ case VIA_P4M900:
+ case VIA_VX800:
+ case VIA_VX855:
+ num_new = viaSetupAdaptors(pScreen, &newAdaptors);
+ num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
+ break;
+ default:
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "[Xv] Unsupported Chipset. X video functionality disabled.\n");
+ num_adaptors = 0;
+ memset(viaAdaptPtr, 0, sizeof(viaAdaptPtr));
+ break;
}
DBG_DD(ErrorF(" via_video.c : num_adaptors : %d\n", num_adaptors));
Index: src/via_panel.c
===================================================================
--- src/via_panel.c (revision 758)
+++ src/via_panel.c (working copy)
@@ -54,7 +54,8 @@ static ViaPanelModeRec ViaPanelNativeModes[] = {
{1920, 1200},
{1024, 600},
{1440, 900},
- {1280, 720}
+ {1280, 720},
+ {1200, 900}
};
static int
Index: src/via_mode.h
===================================================================
--- src/via_mode.h (revision 758)
+++ src/via_mode.h (working copy)
@@ -70,6 +70,7 @@ static struct ViaDotClock {
{ 49500, 0xC353, /* 0xa48c04 */ { 3, 3, 5, 138 } },
{ 50000, 0xC354, /* 0x368c00 */ { 1, 3, 2, 56 } },
{ 56300, 0x4F76, /* 0x3d8c00 */ { 1, 3, 2, 63 } },
+ { 57275, 0x4E70, /* 0x3e8c00 */ { 1, 3, 6, 299 } },
{ 57284, 0x4E70, /* 0x3e8c00 */ { 1, 3, 2, 64 } },
{ 64995, 0x0D3B, /* 0x6b8c01 */ { 1, 3, 3, 109 } },
{ 65000, 0x0D3B, /* 0x6b8c01 */ { 1, 3, 3, 109 } }, /* Slightly unstable on PM800 */
@@ -135,6 +136,7 @@ static DisplayModeRec ViaPanelModes[] = {
{ MODEPREFIX("1152x864"), 81613, 1152, 1216, 1336, 1520, 0, 864, 864, 867, 895, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX },
{ MODEPREFIX("1280x768"), 81135, 1280, 1328, 1440, 1688, 0, 768, 770, 776, 802, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX },
{ MODEPREFIX("1280x720"), 74600, 1280, 1341, 1474, 1688, 0, 720, 721, 724, 746, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX },
+ { MODEPREFIX("1200x900"), 57200, 1200, 1206, 1214, 1240, 0, 900, 905, 907, 912, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX },
{ MODEPREFIX("1280x960"), 108280, 1280, 1376, 1488, 1800, 0, 960, 960, 963, 1000, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX },
{ MODEPREFIX("1280x1024"), 108280, 1280, 1328, 1440, 1688, 0, 1024, 1024, 1027, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX },
{ MODEPREFIX("1360x768"), 85500, 1360, 1392, 1712, 1744, 0, 768, 783, 791, 807, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX },
@@ -168,6 +170,7 @@ static DisplayModeRec ViaPanelModes[] = {
#define VIA_RES_1280X720 19
#define VIA_RES_1920X1080 20
#define VIA_RES_1366X768 22
+#define VIA_RES_1200X900 23
#define VIA_RES_INVALID 0xFF
/*
@@ -199,6 +202,7 @@ static struct {
{VIA_RES_856X480, VIA_PANEL_INVALID, 856, 480},
{VIA_RES_1024X576, VIA_PANEL_INVALID, 1024, 576},
{VIA_RES_800X480, VIA_PANEL8X4, 800, 480},
+ {VIA_RES_1200X900, VIA_PANEL12X9, 1200, 900},
{VIA_RES_INVALID, VIA_PANEL_INVALID, 0, 0}
};
Index: src/via_bios.h
===================================================================
--- src/via_bios.h (revision 758)
+++ src/via_bios.h (working copy)
@@ -42,6 +42,7 @@
#define VIA_PANEL10X6 13
#define VIA_PANEL14X9 14
#define VIA_PANEL1280X720 15
+#define VIA_PANEL12X9 16
#define VIA_PANEL_INVALID 255
#define TVTYPE_NONE 0x00
_______________________________________________
Openchrome-devel mailing list
[email protected]
http://wiki.openchrome.org/mailman/listinfo/openchrome-devel