rev |
line source |
al@21072
|
1 From 0ece556daa8a88771b669d8104396abd9166d2d0 Mon Sep 17 00:00:00 2001
|
al@21072
|
2 From: Stefan Dirsch <sndirsch@suse.de>
|
al@21072
|
3 Date: Mon, 25 Jun 2018 15:55:06 +0200
|
al@21072
|
4 Subject: [PATCH] Add check for max[HV]Value to ValidMode hook
|
al@21072
|
5
|
al@21072
|
6 xorg-server 1.20 removed this check, so implement this in the driver
|
al@21072
|
7 itself.
|
al@21072
|
8
|
al@21072
|
9 Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
|
al@21072
|
10 Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
al@21072
|
11 ---
|
al@21072
|
12 src/savage_driver.c | 10 ++++++++--
|
al@21072
|
13 1 file changed, 8 insertions(+), 2 deletions(-)
|
al@21072
|
14
|
al@21072
|
15 diff --git a/src/savage_driver.c b/src/savage_driver.c
|
al@21072
|
16 index 58a294d..3cda923 100644
|
al@21072
|
17 --- a/src/savage_driver.c
|
al@21072
|
18 +++ b/src/savage_driver.c
|
al@21072
|
19 @@ -2034,8 +2034,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
|
al@21072
|
20 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n",
|
al@21072
|
21 mclk / 1000.0);
|
al@21072
|
22
|
al@21072
|
23 - pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */
|
al@21072
|
24 - pScrn->maxVValue = 2048; /* 11 bits of v_total */
|
al@21072
|
25 pScrn->virtualX = pScrn->display->virtualX;
|
al@21072
|
26 pScrn->virtualY = pScrn->display->virtualY;
|
al@21072
|
27
|
al@21072
|
28 @@ -3637,6 +3635,14 @@ static ModeStatus SavageValidMode(SCRN_ARG_TYPE arg, DisplayModePtr pMode,
|
al@21072
|
29 (pMode->VDisplay > psav->PanelY)))
|
al@21072
|
30 return MODE_PANEL;
|
al@21072
|
31
|
al@21072
|
32 + /* 11 bits of h_total 8-pixel units */
|
al@21072
|
33 + if (pMode->HTotal > (2048 << 3))
|
al@21072
|
34 + return MODE_BAD_HVALUE;
|
al@21072
|
35 +
|
al@21072
|
36 + /* 11 bits of v_total */
|
al@21072
|
37 + if (pMode->VTotal > 2048)
|
al@21072
|
38 + return MODE_BAD_VVALUE;
|
al@21072
|
39 +
|
al@21072
|
40 if (psav->UseBIOS) {
|
al@21072
|
41 refresh = SavageGetRefresh(pMode);
|
al@21072
|
42 return (SavageMatchBiosMode(pScrn,pMode->HDisplay,
|
al@21072
|
43 --
|
al@21072
|
44 2.18.0
|
al@21072
|
45
|