summaryrefslogtreecommitdiff
path: root/drivers/staging/media/zoran/zoran_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/media/zoran/zoran_device.c')
-rw-r--r--drivers/staging/media/zoran/zoran_device.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c
index e569a1341d01..cf788d9cd1df 100644
--- a/drivers/staging/media/zoran/zoran_device.c
+++ b/drivers/staging/media/zoran/zoran_device.c
@@ -291,11 +291,11 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
const struct zoran_format *format)
{
const struct tvnorm *tvn;
- unsigned int h_start, HEnd, v_start, VEnd;
- unsigned int DispMode;
- unsigned int VidWinWid, VidWinHt;
+ unsigned int h_start, h_end, v_start, v_end;
+ unsigned int disp_mode;
+ unsigned int vid_win_wid, vid_win_ht;
unsigned int hcrop1, hcrop2, vcrop1, vcrop2;
- unsigned int wa, We, ha, He;
+ unsigned int wa, we, ha, he;
unsigned int X, Y, hor_dcm, ver_dcm;
u32 reg;
@@ -316,12 +316,12 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
/**** zr36057 ****/
/* horizontal */
- VidWinWid = video_width;
- X = DIV_ROUND_UP(VidWinWid * 64, tvn->wa);
- We = (VidWinWid * 64) / X;
+ vid_win_wid = video_width;
+ X = DIV_ROUND_UP(vid_win_wid * 64, tvn->wa);
+ we = (vid_win_wid * 64) / X;
hor_dcm = 64 - X;
- hcrop1 = 2 * ((tvn->wa - We) / 4);
- hcrop2 = tvn->wa - We - hcrop1;
+ hcrop1 = 2 * ((tvn->wa - we) / 4);
+ hcrop2 = tvn->wa - we - hcrop1;
h_start = tvn->h_start ? tvn->h_start : 1;
/* (Ronald) Original comment:
* "| 1 Doesn't have any effect, tested on both a DC10 and a DC10+"
@@ -331,29 +331,29 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
* However, the DC10 has '0' as h_start, but does need |1, so we
* use a dirty check...
*/
- HEnd = h_start + tvn->wa - 1;
+ h_end = h_start + tvn->wa - 1;
h_start += hcrop1;
- HEnd -= hcrop2;
+ h_end -= hcrop2;
reg = ((h_start & ZR36057_VFEHCR_HMASK) << ZR36057_VFEHCR_H_START)
- | ((HEnd & ZR36057_VFEHCR_HMASK) << ZR36057_VFEHCR_H_END);
+ | ((h_end & ZR36057_VFEHCR_HMASK) << ZR36057_VFEHCR_H_END);
if (zr->card.vfe_pol.hsync_pol)
reg |= ZR36057_VFEHCR_HS_POL;
btwrite(reg, ZR36057_VFEHCR);
/* Vertical */
- DispMode = !(video_height > BUZ_MAX_HEIGHT / 2);
- VidWinHt = DispMode ? video_height : video_height / 2;
- Y = DIV_ROUND_UP(VidWinHt * 64 * 2, tvn->ha);
- He = (VidWinHt * 64) / Y;
+ disp_mode = !(video_height > BUZ_MAX_HEIGHT / 2);
+ vid_win_ht = disp_mode ? video_height : video_height / 2;
+ Y = DIV_ROUND_UP(vid_win_ht * 64 * 2, tvn->ha);
+ he = (vid_win_ht * 64) / Y;
ver_dcm = 64 - Y;
- vcrop1 = (tvn->ha / 2 - He) / 2;
- vcrop2 = tvn->ha / 2 - He - vcrop1;
+ vcrop1 = (tvn->ha / 2 - he) / 2;
+ vcrop2 = tvn->ha / 2 - he - vcrop1;
v_start = tvn->v_start;
- VEnd = v_start + tvn->ha / 2; // - 1; FIXME SnapShot times out with -1 in 768*576 on the DC10 - LP
+ v_end = v_start + tvn->ha / 2; // - 1; FIXME SnapShot times out with -1 in 768*576 on the DC10 - LP
v_start += vcrop1;
- VEnd -= vcrop2;
+ v_end -= vcrop2;
reg = ((v_start & ZR36057_VFEVCR_VMASK) << ZR36057_VFEVCR_V_START)
- | ((VEnd & ZR36057_VFEVCR_VMASK) << ZR36057_VFEVCR_V_END);
+ | ((v_end & ZR36057_VFEVCR_VMASK) << ZR36057_VFEVCR_V_END);
if (zr->card.vfe_pol.vsync_pol)
reg |= ZR36057_VFEVCR_VS_POL;
btwrite(reg, ZR36057_VFEVCR);
@@ -362,7 +362,7 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
reg = 0;
reg |= (hor_dcm << ZR36057_VFESPFR_HOR_DCM);
reg |= (ver_dcm << ZR36057_VFESPFR_VER_DCM);
- reg |= (DispMode << ZR36057_VFESPFR_DISP_MODE);
+ reg |= (disp_mode << ZR36057_VFESPFR_DISP_MODE);
/* RJ: I don't know, why the following has to be the opposite
* of the corresponding ZR36060 setting, but only this way
* we get the correct colors when uncompressing to the screen */
@@ -383,8 +383,8 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
/* display configuration */
reg = (16 << ZR36057_VDCR_MIN_PIX)
- | (VidWinHt << ZR36057_VDCR_VID_WIN_HT)
- | (VidWinWid << ZR36057_VDCR_VID_WIN_WID);
+ | (vid_win_ht << ZR36057_VDCR_VID_WIN_HT)
+ | (vid_win_wid << ZR36057_VDCR_VID_WIN_WID);
if (pci_pci_problems & PCIPCI_TRITON)
// || zr->revision < 1) // Revision 1 has also Triton support
reg &= ~ZR36057_VDCR_TRITON;