From: Peter Huewe <peterhuewe@gmx.de>
To: gregkh@linuxfoundation.org
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Dan Carpenter <dan.carpenter@oracle.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Peter Huewe <peterhuewe@gmx.de>
Subject: [PATCH 6/7] staging/xgifb: Use TVCLKBASE_315 as a base address
Date: Thu, 9 Feb 2012 21:11:48 +0100 [thread overview]
Message-ID: <1328818309-5103-7-git-send-email-peterhuewe@gmx.de> (raw)
In-Reply-To: <1328818309-5103-1-git-send-email-peterhuewe@gmx.de>
Since the defines TVVCLKDIV2, TVVCLK, HiTVVCLKDIV2, HiTVVCLK,
HiTVSimuVCLK and HiTVTextVCLK are now defined as relative values, we
have to use TVCLKBASE_315 (0x31) as a base address to get the same values
as before the merge.
The old and now duplicated defines were removed
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
drivers/staging/xgifb/vb_def.h | 6 ------
drivers/staging/xgifb/vb_setmode.c | 24 ++++++++++++------------
2 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/xgifb/vb_def.h b/drivers/staging/xgifb/vb_def.h
index a4fedbd..d2e0bcd 100644
--- a/drivers/staging/xgifb/vb_def.h
+++ b/drivers/staging/xgifb/vb_def.h
@@ -288,12 +288,6 @@
#define VCLK217_325 0x55
#define XGI_YPbPr750pVCLK 0x57
-#define TVVCLKDIV2 0x3A
-#define TVVCLK 0x3B
-#define HiTVVCLKDIV2 0x3C
-#define HiTVVCLK 0x3D
-#define HiTVSimuVCLK 0x3E
-#define HiTVTextVCLK 0x3F
#define VCLK39_77 0x40
#define YPbPr525pVCLK 0x3A
#define NTSC1024VCLK 0x41
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 42eaec7..2919924 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -1273,19 +1273,19 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
VCLKIndex = LCDXlat1VCLK[CRT2Index];
} else if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
if (pVBInfo->SetFlag & RPLLDIV2XO) {
- VCLKIndex = HiTVVCLKDIV2;
+ VCLKIndex = TVCLKBASE_315 + HiTVVCLKDIV2;
VCLKIndex += 25;
} else {
- VCLKIndex = HiTVVCLK;
+ VCLKIndex = TVCLKBASE_315 + HiTVVCLK;
VCLKIndex += 25;
}
if (pVBInfo->SetFlag & TVSimuMode) {
if (modeflag & Charx8Dot) {
- VCLKIndex = HiTVSimuVCLK;
+ VCLKIndex = TVCLKBASE_315 + HiTVSimuVCLK;
VCLKIndex += 25;
} else {
- VCLKIndex = HiTVTextVCLK;
+ VCLKIndex = TVCLKBASE_315 + HiTVTextVCLK;
VCLKIndex += 25;
}
}
@@ -1304,10 +1304,10 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
}
} else if (pVBInfo->VBInfo & SetCRT2ToTV) {
if (pVBInfo->SetFlag & RPLLDIV2XO) {
- VCLKIndex = TVVCLKDIV2;
+ VCLKIndex = TVCLKBASE_315 + TVVCLKDIV2;
VCLKIndex += 25;
} else {
- VCLKIndex = TVVCLK;
+ VCLKIndex = TVCLKBASE_315 + TVVCLK;
VCLKIndex += 25;
}
} else { /* for CRT2 */
@@ -2845,13 +2845,13 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
VB_SIS302LV |
VB_XGI301C)) {
if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
- tempal = HiTVVCLKDIV2;
+ tempal = TVCLKBASE_315 + HiTVVCLKDIV2;
if (!(pVBInfo->TVInfo & RPLLDIV2XO))
- tempal = HiTVVCLK;
+ tempal = TVCLKBASE_315 + HiTVVCLK;
if (pVBInfo->TVInfo & TVSimuMode) {
- tempal = HiTVSimuVCLK;
+ tempal = TVCLKBASE_315 + HiTVSimuVCLK;
if (!(modeflag & Charx8Dot))
- tempal = HiTVTextVCLK;
+ tempal = TVCLKBASE_315 + HiTVTextVCLK;
}
return tempal;
@@ -2870,9 +2870,9 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
tempal = NTSC1024VCLK;
if (!(pVBInfo->TVInfo & NTSC1024x768)) {
- tempal = TVVCLKDIV2;
+ tempal = TVCLKBASE_315 + TVVCLKDIV2;
if (!(pVBInfo->TVInfo & RPLLDIV2XO))
- tempal = TVVCLK;
+ tempal = TVCLKBASE_315 + TVVCLK;
}
if (pVBInfo->VBInfo & SetCRT2ToTV)
--
1.7.3.4
next prev parent reply other threads:[~2012-02-09 20:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 20:11 staging/xgifb: Use sis headers and remove duplicated structs and defines (part II) Peter Huewe
2012-02-09 20:11 ` [PATCH 1/7] staging/xgifb: Include sis initdef.h header Peter Huewe
2012-02-09 20:11 ` [PATCH 2/7] staging/xgifb: Rename panel defines and remove duplicated defines Peter Huewe
2012-02-09 20:11 ` [PATCH 3/7] staging/xgifb: Rename Set* " Peter Huewe
2012-02-09 20:11 ` [PATCH 4/7] staging/xgifb: Rename remaining sis initdef.h defines and remove duplicates Peter Huewe
2012-02-09 20:11 ` [PATCH 5/7] staging/xgifb: Rename XGI specific initdef.h defines Peter Huewe
2012-02-09 20:11 ` Peter Huewe [this message]
2012-02-09 20:11 ` [PATCH 7/7] staging/xgifb: remove remaining duplicate " Peter Huewe
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=1328818309-5103-7-git-send-email-peterhuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=aaro.koskinen@iki.fi \
--cc=arnaud.patard@rtp-net.org \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®