Commit c0a80d5c authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: zoran: fix checkpatch --strict issues

Prepare for moving this driver to mainline by fixing the remaining
checkpatch issues.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 8847fb9b
...@@ -92,9 +92,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) ...@@ -92,9 +92,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master)
h->attached += 1; h->attached += 1;
return codec; return codec;
} else {
kfree(codec);
} }
kfree(codec);
} }
h = h->next; h = h->next;
} }
...@@ -255,8 +254,8 @@ int videocodec_debugfs_show(struct seq_file *m) ...@@ -255,8 +254,8 @@ int videocodec_debugfs_show(struct seq_file *m)
struct codec_list *h = codeclist_top; struct codec_list *h = codeclist_top;
struct attached_list *a; struct attached_list *a;
seq_printf(m, "<S>lave or attached <M>aster name type flags magic "); seq_puts(m, "<S>lave or attached <M>aster name type flags magic ");
seq_printf(m, "(connected as)\n"); seq_puts(m, "(connected as)\n");
while (h) { while (h) {
seq_printf(m, "S %32s %04x %08lx %08lx (TEMPLATE)\n", seq_printf(m, "S %32s %04x %08lx %08lx (TEMPLATE)\n",
......
This diff is collapsed.
...@@ -140,11 +140,16 @@ struct zoran_v4l_settings { ...@@ -140,11 +140,16 @@ struct zoran_v4l_settings {
/* jpg-capture/-playback settings */ /* jpg-capture/-playback settings */
struct zoran_jpg_settings { struct zoran_jpg_settings {
int decimation; /* this bit is used to set everything to default */ /* this bit is used to set everything to default */
int hor_dcm, ver_dcm, tmp_dcm; /* capture decimation settings (tmp_dcm=1 means both fields) */ int decimation;
int field_per_buff, odd_even; /* field-settings (odd_even=1 (+tmp_dcm=1) means top-field-first) */ /* capture decimation settings (tmp_dcm=1 means both fields) */
int img_x, img_y, img_width, img_height; /* crop settings (subframe capture) */ int hor_dcm, ver_dcm, tmp_dcm;
struct v4l2_jpegcompression jpg_comp; /* JPEG-specific capture settings */ /* field-settings (odd_even=1 (+tmp_dcm=1) means top-field-first) */
int field_per_buff, odd_even;
/* crop settings (subframe capture) */
int img_x, img_y, img_width, img_height;
/* JPEG-specific capture settings */
struct v4l2_jpegcompression jpg_comp;
}; };
struct zoran; struct zoran;
...@@ -248,7 +253,8 @@ struct zoran { ...@@ -248,7 +253,8 @@ struct zoran {
unsigned long vbseq; unsigned long vbseq;
/* zr36057's code buffer table */ /* zr36057's code buffer table */
__le32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */
__le32 *stat_com;
/* Additional stuff for testing */ /* Additional stuff for testing */
unsigned int ghost_int; unsigned int ghost_int;
...@@ -292,14 +298,16 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev) ...@@ -292,14 +298,16 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev)
return container_of(v4l2_dev, struct zoran, v4l2_dev); return container_of(v4l2_dev, struct zoran, v4l2_dev);
} }
/* There was something called _ALPHA_BUZ that used the PCI address instead of /*
* the kernel iomapped address for btread/btwrite. */ * There was something called _ALPHA_BUZ that used the PCI address instead of
* the kernel iomapped address for btread/btwrite.
*/
#define btwrite(dat, adr) writel((dat), zr->zr36057_mem + (adr)) #define btwrite(dat, adr) writel((dat), zr->zr36057_mem + (adr))
#define btread(adr) readl(zr->zr36057_mem + (adr)) #define btread(adr) readl(zr->zr36057_mem + (adr))
#define btand(dat, adr) btwrite((dat) & btread(adr), adr) #define btand(dat, adr) btwrite((dat) & btread(adr), (adr))
#define btor(dat, adr) btwrite((dat) | btread(adr), adr) #define btor(dat, adr) btwrite((dat) | btread(adr), (adr))
#define btaor(dat, mask, adr) btwrite((dat) | ((mask) & btread(adr)), adr) #define btaor(dat, mask, adr) btwrite((dat) | ((mask) & btread(adr)), (adr))
#endif #endif
......
...@@ -172,8 +172,6 @@ void zr36016_write(struct videocodec *codec, u16 reg, u32 val) ...@@ -172,8 +172,6 @@ void zr36016_write(struct videocodec *codec, u16 reg, u32 val)
static void dc10_init(struct zoran *zr) static void dc10_init(struct zoran *zr)
{ {
pci_dbg(zr->pci_dev, "%s\n", __func__);
/* Pixel clock selection */ /* Pixel clock selection */
GPIO(zr, 4, 0); GPIO(zr, 4, 0);
GPIO(zr, 5, 1); GPIO(zr, 5, 1);
...@@ -183,13 +181,10 @@ static void dc10_init(struct zoran *zr) ...@@ -183,13 +181,10 @@ static void dc10_init(struct zoran *zr)
static void dc10plus_init(struct zoran *zr) static void dc10plus_init(struct zoran *zr)
{ {
pci_dbg(zr->pci_dev, "%s\n", __func__);
} }
static void buz_init(struct zoran *zr) static void buz_init(struct zoran *zr)
{ {
pci_dbg(zr->pci_dev, "%s\n", __func__);
/* some stuff from Iomega */ /* some stuff from Iomega */
pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15); pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15);
pci_write_config_dword(zr->pci_dev, 0x0c, 0x00012020); pci_write_config_dword(zr->pci_dev, 0x0c, 0x00012020);
...@@ -198,8 +193,6 @@ static void buz_init(struct zoran *zr) ...@@ -198,8 +193,6 @@ static void buz_init(struct zoran *zr)
static void lml33_init(struct zoran *zr) static void lml33_init(struct zoran *zr)
{ {
pci_dbg(zr->pci_dev, "%s\n", __func__);
GPIO(zr, 2, 1); // Set Composite input/output GPIO(zr, 2, 1); // Set Composite input/output
} }
...@@ -334,10 +327,6 @@ static void videocodec_exit(struct zoran *zr) ...@@ -334,10 +327,6 @@ static void videocodec_exit(struct zoran *zr)
codec_exit(zr, zr->card.video_vfe); codec_exit(zr, zr->card.video_vfe);
} }
// struct tvnorm {
// u16 wt, wa, h_start, h_sync_start, ht, ha, v_start;
// };
static const struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 }; static const struct tvnorm f50sqpixel = { 944, 768, 83, 880, 625, 576, 16 };
static const struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 }; static const struct tvnorm f60sqpixel = { 780, 640, 51, 716, 525, 480, 12 };
static const struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 }; static const struct tvnorm f50ccir601 = { 864, 720, 75, 804, 625, 576, 18 };
...@@ -619,7 +608,10 @@ static struct card_info zoran_cards[NUM_CARDS] = { ...@@ -619,7 +608,10 @@ static struct card_info zoran_cards[NUM_CARDS] = {
}, { }, {
.type = AVS6EYES, .type = AVS6EYES,
.name = "6-Eyes", .name = "6-Eyes",
/* AverMedia chose not to brand the 6-Eyes. Thus it can't be autodetected, and requires card=x. */ /*
* AverMedia chose not to brand the 6-Eyes. Thus it can't be
* autodetected, and requires card=x.
*/
.i2c_decoder = "ks0127", .i2c_decoder = "ks0127",
.addrs_decoder = ks0127_addrs, .addrs_decoder = ks0127_addrs,
.i2c_encoder = "bt866", .i2c_encoder = "bt866",
...@@ -764,7 +756,9 @@ int zoran_check_jpg_settings(struct zoran *zr, ...@@ -764,7 +756,9 @@ int zoran_check_jpg_settings(struct zoran *zr,
case 4: case 4:
if (zr->card.type == DC10_NEW) { if (zr->card.type == DC10_NEW) {
pci_dbg(zr->pci_dev, "%s - HDec by 4 is not supported on the DC10\n", __func__); pci_dbg(zr->pci_dev,
"%s - HDec by 4 is not supported on the DC10\n",
__func__);
err0++; err0++;
break; break;
} }
...@@ -1019,7 +1013,9 @@ static int zr36057_init(struct zoran *zr) ...@@ -1019,7 +1013,9 @@ static int zr36057_init(struct zoran *zr)
zr->timing = zr->card.tvn[ZR_NORM_SECAM]; zr->timing = zr->card.tvn[ZR_NORM_SECAM];
} }
if (!zr->timing) { if (!zr->timing) {
pci_warn(zr->pci_dev, "%s - default TV standard not supported by hardware. PAL will be used.\n", __func__); pci_warn(zr->pci_dev,
"%s - default TV standard not supported by hardware. PAL will be used.\n",
__func__);
zr->norm = V4L2_STD_PAL; zr->norm = V4L2_STD_PAL;
zr->timing = zr->card.tvn[ZR_NORM_PAL]; zr->timing = zr->card.tvn[ZR_NORM_PAL];
} }
...@@ -1038,9 +1034,9 @@ static int zr36057_init(struct zoran *zr) ...@@ -1038,9 +1034,9 @@ static int zr36057_init(struct zoran *zr)
zr->stat_com = dma_alloc_coherent(&zr->pci_dev->dev, zr->stat_com = dma_alloc_coherent(&zr->pci_dev->dev,
BUZ_NUM_STAT_COM * sizeof(u32), BUZ_NUM_STAT_COM * sizeof(u32),
&zr->p_sc, GFP_KERNEL); &zr->p_sc, GFP_KERNEL);
if (!zr->stat_com) { if (!zr->stat_com)
return -ENOMEM; return -ENOMEM;
}
for (j = 0; j < BUZ_NUM_STAT_COM; j++) for (j = 0; j < BUZ_NUM_STAT_COM; j++)
zr->stat_com[j] = cpu_to_le32(1); /* mark as unavailable to zr36057 */ zr->stat_com[j] = cpu_to_le32(1); /* mark as unavailable to zr36057 */
...@@ -1066,9 +1062,11 @@ static int zr36057_init(struct zoran *zr) ...@@ -1066,9 +1062,11 @@ static int zr36057_init(struct zoran *zr)
return 0; return 0;
exit_statcomb: exit_statcomb:
dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2, zr->stat_comb, zr->p_scb); dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2,
zr->stat_comb, zr->p_scb);
exit_statcom: exit_statcom:
dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32), zr->stat_com, zr->p_sc); dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32),
zr->stat_com, zr->p_sc);
return err; return err;
} }
...@@ -1099,8 +1097,10 @@ static void zoran_remove(struct pci_dev *pdev) ...@@ -1099,8 +1097,10 @@ static void zoran_remove(struct pci_dev *pdev)
btwrite(0, ZR36057_SPGPPCR); btwrite(0, ZR36057_SPGPPCR);
pci_free_irq(zr->pci_dev, 0, zr); pci_free_irq(zr->pci_dev, 0, zr);
/* unmap and free memory */ /* unmap and free memory */
dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32), zr->stat_com, zr->p_sc); dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32),
dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2, zr->stat_comb, zr->p_scb); zr->stat_com, zr->p_sc);
dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2,
zr->stat_comb, zr->p_scb);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(zr->pci_dev); pci_disable_device(zr->pci_dev);
zoran_exit_video_devices(zr); zoran_exit_video_devices(zr);
...@@ -1299,7 +1299,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1299,7 +1299,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_err(pdev, "Unknown card, try specifying card=X module parameter\n"); pci_err(pdev, "Unknown card, try specifying card=X module parameter\n");
goto zr_unreg; goto zr_unreg;
} }
pci_info(zr->pci_dev, "%s() - card %s detected\n", __func__, zoran_cards[card_num].name); pci_info(zr->pci_dev, "%s() - card %s detected\n", __func__,
zoran_cards[card_num].name);
} else { } else {
card_num = card[nr]; card_num = card[nr];
if (card_num >= NUM_CARDS || card_num < 0) { if (card_num >= NUM_CARDS || card_num < 0) {
...@@ -1324,7 +1325,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1324,7 +1325,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err) if (err)
goto zr_unreg; goto zr_unreg;
zr->zr36057_mem = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); zr->zr36057_mem = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0));
if (!zr->zr36057_mem) { if (!zr->zr36057_mem) {
pci_err(pdev, "%s() - ioremap failed\n", __func__); pci_err(pdev, "%s() - ioremap failed\n", __func__);
goto zr_pci_release; goto zr_pci_release;
...@@ -1348,7 +1350,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1348,7 +1350,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
&latency); &latency);
need_latency = zr->revision > 1 ? 32 : 48; need_latency = zr->revision > 1 ? 32 : 48;
if (latency != need_latency) { if (latency != need_latency) {
pci_info(zr->pci_dev, "Changing PCI latency from %d to %d\n", latency, need_latency); pci_info(zr->pci_dev, "Changing PCI latency from %d to %d\n",
latency, need_latency);
pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, need_latency); pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, need_latency);
} }
......
...@@ -19,11 +19,10 @@ extern int zr36067_debug; ...@@ -19,11 +19,10 @@ extern int zr36067_debug;
extern const struct video_device zoran_template; extern const struct video_device zoran_template;
extern int zoran_check_jpg_settings(struct zoran *zr, int zoran_check_jpg_settings(struct zoran *zr,
struct zoran_jpg_settings *settings, struct zoran_jpg_settings *settings, int try);
int try); void zoran_open_init_params(struct zoran *zr);
extern void zoran_open_init_params(struct zoran *zr); void zoran_vdev_release(struct video_device *vdev);
extern void zoran_vdev_release(struct video_device *vdev);
void zr36016_write(struct videocodec *codec, u16 reg, u32 val); void zr36016_write(struct videocodec *codec, u16 reg, u32 val);
......
...@@ -50,7 +50,6 @@ static bool lml33dpath; /* default = 0 ...@@ -50,7 +50,6 @@ static bool lml33dpath; /* default = 0
module_param(lml33dpath, bool, 0644); module_param(lml33dpath, bool, 0644);
MODULE_PARM_DESC(lml33dpath, "Use digital path capture mode (on LML33 cards)"); MODULE_PARM_DESC(lml33dpath, "Use digital path capture mode (on LML33 cards)");
int zr_set_buf(struct zoran *zr);
/* /*
* initialize video front end * initialize video front end
*/ */
...@@ -108,7 +107,6 @@ int post_office_wait(struct zoran *zr) ...@@ -108,7 +107,6 @@ int post_office_wait(struct zoran *zr)
{ {
u32 por; u32 por;
// while (((por = btread(ZR36057_POR)) & (ZR36057_POR_PO_PEN | ZR36057_POR_PO_TIME)) == ZR36057_POR_PO_PEN) {
while ((por = btread(ZR36057_POR)) & ZR36057_POR_PO_PEN) { while ((por = btread(ZR36057_POR)) & ZR36057_POR_PO_PEN) {
/* wait for something to happen */ /* wait for something to happen */
/* TODO add timeout */ /* TODO add timeout */
...@@ -155,10 +153,12 @@ void jpeg_codec_sleep(struct zoran *zr, int sleep) ...@@ -155,10 +153,12 @@ void jpeg_codec_sleep(struct zoran *zr, int sleep)
{ {
GPIO(zr, zr->card.gpio[ZR_GPIO_JPEG_SLEEP], !sleep); GPIO(zr, zr->card.gpio[ZR_GPIO_JPEG_SLEEP], !sleep);
if (!sleep) { if (!sleep) {
pci_dbg(zr->pci_dev, "%s() - wake GPIO=0x%08x\n", __func__, btread(ZR36057_GPPGCR1)); pci_dbg(zr->pci_dev, "%s() - wake GPIO=0x%08x\n",
udelay(500); __func__, btread(ZR36057_GPPGCR1));
usleep_range(500, 1000);
} else { } else {
pci_dbg(zr->pci_dev, "%s() - sleep GPIO=0x%08x\n", __func__, btread(ZR36057_GPPGCR1)); pci_dbg(zr->pci_dev, "%s() - sleep GPIO=0x%08x\n",
__func__, btread(ZR36057_GPPGCR1));
udelay(2); udelay(2);
} }
} }
...@@ -284,7 +284,8 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height, ...@@ -284,7 +284,8 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
vcrop1 = (tvn->ha / 2 - he) / 2; vcrop1 = (tvn->ha / 2 - he) / 2;
vcrop2 = tvn->ha / 2 - he - vcrop1; vcrop2 = tvn->ha / 2 - he - vcrop1;
v_start = tvn->v_start; v_start = tvn->v_start;
v_end = v_start + tvn->ha / 2; // - 1; FIXME SnapShot times out with -1 in 768*576 on the DC10 - LP // FIXME SnapShot times out with -1 in 768*576 on the DC10 - LP
v_end = v_start + tvn->ha / 2; // - 1;
v_start += vcrop1; v_start += vcrop1;
v_end -= vcrop2; v_end -= vcrop2;
reg = ((v_start & ZR36057_VFEVCR_VMASK) << ZR36057_VFEVCR_V_START) reg = ((v_start & ZR36057_VFEVCR_VMASK) << ZR36057_VFEVCR_V_START)
...@@ -298,10 +299,12 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height, ...@@ -298,10 +299,12 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
reg |= (hor_dcm << ZR36057_VFESPFR_HOR_DCM); reg |= (hor_dcm << ZR36057_VFESPFR_HOR_DCM);
reg |= (ver_dcm << ZR36057_VFESPFR_VER_DCM); reg |= (ver_dcm << ZR36057_VFESPFR_VER_DCM);
reg |= (disp_mode << ZR36057_VFESPFR_DISP_MODE); reg |= (disp_mode << ZR36057_VFESPFR_DISP_MODE);
/* RJ: I don't know, why the following has to be the opposite /*
* RJ: I don't know, why the following has to be the opposite
* of the corresponding ZR36060 setting, but only this way * of the corresponding ZR36060 setting, but only this way
* we get the correct colors when uncompressing to the screen */ * we get the correct colors when uncompressing to the screen
//reg |= ZR36057_VFESPFR_VCLK_POL; /**/ */
//reg |= ZR36057_VFESPFR_VCLK_POL;
/* RJ: Don't know if that is needed for NTSC also */ /* RJ: Don't know if that is needed for NTSC also */
if (!(zr->norm & V4L2_STD_NTSC)) if (!(zr->norm & V4L2_STD_NTSC))
reg |= ZR36057_VFESPFR_EXT_FL; // NEEDED!!!!!!! Wolfgang reg |= ZR36057_VFESPFR_EXT_FL; // NEEDED!!!!!!! Wolfgang
...@@ -342,7 +345,7 @@ void zr36057_set_memgrab(struct zoran *zr, int mode) ...@@ -342,7 +345,7 @@ void zr36057_set_memgrab(struct zoran *zr, int mode)
* will be stuck at 1 until capturing is turned back on. * will be stuck at 1 until capturing is turned back on.
*/ */
if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SNAP_SHOT) if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SNAP_SHOT)
pci_warn(zr->pci_dev, "zr36057_set_memgrab(1) with SnapShot on!?\n"); pci_warn(zr->pci_dev, "%s(1) with SnapShot on!?\n", __func__);
/* switch on VSync interrupts */ /* switch on VSync interrupts */
btwrite(IRQ_MASK, ZR36057_ISR); // Clear Interrupts btwrite(IRQ_MASK, ZR36057_ISR); // Clear Interrupts
...@@ -595,11 +598,9 @@ void jpeg_start(struct zoran *zr) ...@@ -595,11 +598,9 @@ void jpeg_start(struct zoran *zr)
/* enable the Go generation */ /* enable the Go generation */
btor(ZR36057_JMC_GO_EN, ZR36057_JMC); btor(ZR36057_JMC_GO_EN, ZR36057_JMC);
udelay(30); usleep_range(30, 100);
set_frame(zr, 1); // /FRAME set_frame(zr, 1); // /FRAME
pci_dbg(zr->pci_dev, "jpeg_start\n");
} }
void zr36057_enable_jpg(struct zoran *zr, enum zoran_codec_mode mode) void zr36057_enable_jpg(struct zoran *zr, enum zoran_codec_mode mode)
...@@ -803,8 +804,10 @@ static void zoran_reap_stat_com(struct zoran *zr) ...@@ -803,8 +804,10 @@ static void zoran_reap_stat_com(struct zoran *zr)
unsigned int size = 0; unsigned int size = 0;
u32 fcnt; u32 fcnt;
/* In motion decompress we don't have a hardware frame counter, /*
* we just count the interrupts here */ * In motion decompress we don't have a hardware frame counter,
* we just count the interrupts here
*/
if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS) if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS)
zr->jpg_seq_num++; zr->jpg_seq_num++;
...@@ -938,9 +941,9 @@ void zoran_init_hardware(struct zoran *zr) ...@@ -938,9 +941,9 @@ void zoran_init_hardware(struct zoran *zr)
void zr36057_restart(struct zoran *zr) void zr36057_restart(struct zoran *zr)
{ {
btwrite(0, ZR36057_SPGPPCR); btwrite(0, ZR36057_SPGPPCR);
udelay(1000); usleep_range(1000, 2000);
btor(ZR36057_SPGPPCR_SOFT_RESET, ZR36057_SPGPPCR); btor(ZR36057_SPGPPCR_SOFT_RESET, ZR36057_SPGPPCR);
udelay(1000); usleep_range(1000, 2000);
/* assert P_Reset */ /* assert P_Reset */
btwrite(0, ZR36057_JPC); btwrite(0, ZR36057_JPC);
......
...@@ -13,37 +13,37 @@ ...@@ -13,37 +13,37 @@
#define __ZORAN_DEVICE_H__ #define __ZORAN_DEVICE_H__
/* general purpose I/O */ /* general purpose I/O */
extern void GPIO(struct zoran *zr, int bit, unsigned int value); void GPIO(struct zoran *zr, int bit, unsigned int value);
/* codec (or actually: guest bus) access */ /* codec (or actually: guest bus) access */
extern int post_office_wait(struct zoran *zr); int post_office_wait(struct zoran *zr);
extern int post_office_write(struct zoran *zr, unsigned int guest, unsigned int reg, unsigned int value); int post_office_write(struct zoran *zr, unsigned int guest, unsigned int reg,
extern int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg); unsigned int value);
int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg);
extern void jpeg_codec_sleep(struct zoran *zr, int sleep); void jpeg_codec_sleep(struct zoran *zr, int sleep);
extern int jpeg_codec_reset(struct zoran *zr); int jpeg_codec_reset(struct zoran *zr);
/* zr360x7 access to raw capture */ /* zr360x7 access to raw capture */
extern void zr36057_overlay(struct zoran *zr, int on); void zr36057_overlay(struct zoran *zr, int on);
extern void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count); void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count);
extern void zr36057_set_memgrab(struct zoran *zr, int mode); void zr36057_set_memgrab(struct zoran *zr, int mode);
extern int wait_grab_pending(struct zoran *zr); int wait_grab_pending(struct zoran *zr);
/* interrupts */ /* interrupts */
extern void print_interrupts(struct zoran *zr); void print_interrupts(struct zoran *zr);
extern void clear_interrupt_counters(struct zoran *zr); void clear_interrupt_counters(struct zoran *zr);
extern irqreturn_t zoran_irq(int irq, void *dev_id); irqreturn_t zoran_irq(int irq, void *dev_id);
/* JPEG codec access */ /* JPEG codec access */
extern void jpeg_start(struct zoran *zr); void jpeg_start(struct zoran *zr);
extern void zr36057_enable_jpg(struct zoran *zr, void zr36057_enable_jpg(struct zoran *zr, enum zoran_codec_mode mode);
enum zoran_codec_mode mode); void zoran_feed_stat_com(struct zoran *zr);
extern void zoran_feed_stat_com(struct zoran *zr);
/* general */ /* general */
extern void zoran_set_pci_master(struct zoran *zr, int set_master); void zoran_set_pci_master(struct zoran *zr, int set_master);
extern void zoran_init_hardware(struct zoran *zr); void zoran_init_hardware(struct zoran *zr);
extern void zr36057_restart(struct zoran *zr); void zr36057_restart(struct zoran *zr);
extern const struct zoran_format zoran_formats[]; extern const struct zoran_format zoran_formats[];
...@@ -53,8 +53,8 @@ extern int pass_through; ...@@ -53,8 +53,8 @@ extern int pass_through;
/* i2c */ /* i2c */
#define decoder_call(zr, o, f, args...) \ #define decoder_call(zr, o, f, args...) \
v4l2_subdev_call(zr->decoder, o, f, ##args) v4l2_subdev_call((zr)->decoder, o, f, ##args)
#define encoder_call(zr, o, f, args...) \ #define encoder_call(zr, o, f, args...) \
v4l2_subdev_call(zr->encoder, o, f, ##args) v4l2_subdev_call((zr)->encoder, o, f, ##args)
#endif /* __ZORAN_DEVICE_H__ */ #endif /* __ZORAN_DEVICE_H__ */
...@@ -203,7 +203,6 @@ static int zoran_v4l_set_format(struct zoran *zr, int width, int height, ...@@ -203,7 +203,6 @@ static int zoran_v4l_set_format(struct zoran *zr, int width, int height,
static int zoran_set_norm(struct zoran *zr, v4l2_std_id norm) static int zoran_set_norm(struct zoran *zr, v4l2_std_id norm)
{ {
if (!(norm & zr->card.norms)) { if (!(norm & zr->card.norms)) {
pci_dbg(zr->pci_dev, "%s - unsupported norm %llx\n", __func__, norm); pci_dbg(zr->pci_dev, "%s - unsupported norm %llx\n", __func__, norm);
return -EINVAL; return -EINVAL;
...@@ -287,17 +286,6 @@ static int zoran_enum_fmt_vid_cap(struct file *file, void *__fh, ...@@ -287,17 +286,6 @@ static int zoran_enum_fmt_vid_cap(struct file *file, void *__fh,
return zoran_enum_fmt(zr, f, ZORAN_FORMAT_CAPTURE); return zoran_enum_fmt(zr, f, ZORAN_FORMAT_CAPTURE);
} }
#if 0
/* TODO: output does not work yet */
static int zoran_enum_fmt_vid_out(struct file *file, void *__fh,
struct v4l2_fmtdesc *f)
{
struct zoran *zr = video_drvdata(file);
return zoran_enum_fmt(zr, f, ZORAN_FORMAT_PLAYBACK);
}
#endif
static int zoran_g_fmt_vid_out(struct file *file, void *__fh, static int zoran_g_fmt_vid_out(struct file *file, void *__fh,
struct v4l2_format *fmt) struct v4l2_format *fmt)
{ {
...@@ -430,8 +418,10 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh, ...@@ -430,8 +418,10 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh,
fmt->fmt.pix.field = V4L2_FIELD_TOP; fmt->fmt.pix.field = V4L2_FIELD_TOP;
bpp = DIV_ROUND_UP(zoran_formats[i].depth, 8); bpp = DIV_ROUND_UP(zoran_formats[i].depth, 8);
v4l_bound_align_image(&fmt->fmt.pix.width, BUZ_MIN_WIDTH, BUZ_MAX_WIDTH, bpp == 2 ? 1 : 2, v4l_bound_align_image(&fmt->fmt.pix.width, BUZ_MIN_WIDTH, BUZ_MAX_WIDTH,
&fmt->fmt.pix.height, BUZ_MIN_HEIGHT, BUZ_MAX_HEIGHT, 0, 0); bpp == 2 ? 1 : 2,
&fmt->fmt.pix.height, BUZ_MIN_HEIGHT, BUZ_MAX_HEIGHT,
0, 0);
fmt->fmt.pix.bytesperline = fmt->fmt.pix.width * bpp; fmt->fmt.pix.bytesperline = fmt->fmt.pix.width * bpp;
fmt->fmt.pix.sizeimage = fmt->fmt.pix.bytesperline * fmt->fmt.pix.height; fmt->fmt.pix.sizeimage = fmt->fmt.pix.bytesperline * fmt->fmt.pix.height;
return 0; return 0;
...@@ -627,38 +617,6 @@ static int zoran_s_input(struct file *file, void *__fh, unsigned int input) ...@@ -627,38 +617,6 @@ static int zoran_s_input(struct file *file, void *__fh, unsigned int input)
return res; return res;
} }
#if 0
/* TODO: output does not work yet */
static int zoran_enum_output(struct file *file, void *__fh,
struct v4l2_output *outp)
{
if (outp->index != 0)
return -EINVAL;
outp->index = 0;
outp->type = V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY;
outp->std = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;
outp->capabilities = V4L2_OUT_CAP_STD;
strscpy(outp->name, "Autodetect", sizeof(outp->name));
return 0;
}
static int zoran_g_output(struct file *file, void *__fh, unsigned int *output)
{
*output = 0;
return 0;
}
static int zoran_s_output(struct file *file, void *__fh, unsigned int output)
{
if (output != 0)
return -EINVAL;
return 0;
}
#endif
/* cropping (sub-frame capture) */ /* cropping (sub-frame capture) */
static int zoran_g_selection(struct file *file, void *__fh, struct v4l2_selection *sel) static int zoran_g_selection(struct file *file, void *__fh, struct v4l2_selection *sel)
{ {
...@@ -746,9 +704,6 @@ static const struct v4l2_ioctl_ops zoran_ioctl_ops = { ...@@ -746,9 +704,6 @@ static const struct v4l2_ioctl_ops zoran_ioctl_ops = {
.vidioc_enum_input = zoran_enum_input, .vidioc_enum_input = zoran_enum_input,
.vidioc_g_input = zoran_g_input, .vidioc_g_input = zoran_g_input,
.vidioc_s_input = zoran_s_input, .vidioc_s_input = zoran_s_input,
/* .vidioc_enum_output = zoran_enum_output,
.vidioc_g_output = zoran_g_output,
.vidioc_s_output = zoran_s_output,*/
.vidioc_g_std = zoran_g_std, .vidioc_g_std = zoran_g_std,
.vidioc_s_std = zoran_s_std, .vidioc_s_std = zoran_s_std,
.vidioc_create_bufs = vb2_ioctl_create_bufs, .vidioc_create_bufs = vb2_ioctl_create_bufs,
...@@ -760,13 +715,9 @@ static const struct v4l2_ioctl_ops zoran_ioctl_ops = { ...@@ -760,13 +715,9 @@ static const struct v4l2_ioctl_ops zoran_ioctl_ops = {
.vidioc_streamon = vb2_ioctl_streamon, .vidioc_streamon = vb2_ioctl_streamon,
.vidioc_streamoff = vb2_ioctl_streamoff, .vidioc_streamoff = vb2_ioctl_streamoff,
.vidioc_enum_fmt_vid_cap = zoran_enum_fmt_vid_cap, .vidioc_enum_fmt_vid_cap = zoran_enum_fmt_vid_cap,
/* .vidioc_enum_fmt_vid_out = zoran_enum_fmt_vid_out,*/
.vidioc_g_fmt_vid_cap = zoran_g_fmt_vid_cap, .vidioc_g_fmt_vid_cap = zoran_g_fmt_vid_cap,
/* .vidioc_g_fmt_vid_out = zoran_g_fmt_vid_out,*/
.vidioc_s_fmt_vid_cap = zoran_s_fmt_vid_cap, .vidioc_s_fmt_vid_cap = zoran_s_fmt_vid_cap,
/* .vidioc_s_fmt_vid_out = zoran_s_fmt_vid_out,*/
.vidioc_try_fmt_vid_cap = zoran_try_fmt_vid_cap, .vidioc_try_fmt_vid_cap = zoran_try_fmt_vid_cap,
/* .vidioc_try_fmt_vid_out = zoran_try_fmt_vid_out,*/
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event, .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe, .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
}; };
......
...@@ -15,18 +15,19 @@ ...@@ -15,18 +15,19 @@
/* codec io API */ /* codec io API */
#include "videocodec.h" #include "videocodec.h"
/* it doesn't make sense to have more than 20 or so, /*
just to prevent some unwanted loops */ * it doesn't make sense to have more than 20 or so,
* just to prevent some unwanted loops
*/
#define MAX_CODECS 20 #define MAX_CODECS 20
/* amount of chips attached via this driver */ /* amount of chips attached via this driver */
static int zr36016_codecs; static int zr36016_codecs;
/* ========================================================================= /*
Local hardware I/O functions: * Local hardware I/O functions: read/write via codec layer
* (registers are located in the master device)
read/write via codec layer (registers are located in the master device) */
========================================================================= */
/* read and write functions */ /* read and write functions */
static u8 zr36016_read(struct zr36016 *ptr, u16 reg) static u8 zr36016_read(struct zr36016 *ptr, u16 reg)
...@@ -58,9 +59,12 @@ static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) ...@@ -58,9 +59,12 @@ static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value)
zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", ptr->name); zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", ptr->name);
} }
/* indirect read and write functions */ /*
/* the 016 supports auto-addr-increment, but * indirect read and write functions
* writing it all time cost not much and is safer... */ *
* the 016 supports auto-addr-increment, but
* writing it all time cost not much and is safer...
*/
static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) static u8 zr36016_readi(struct zr36016 *ptr, u16 reg)
{ {
u8 value = 0; u8 value = 0;
...@@ -68,8 +72,8 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) ...@@ -68,8 +72,8 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg)
/* just in case something is wrong... */ /* just in case something is wrong... */
if ((ptr->codec->master_data->writereg) && (ptr->codec->master_data->readreg)) { if ((ptr->codec->master_data->writereg) && (ptr->codec->master_data->readreg)) {
ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F); // ADDR ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F);
value = (ptr->codec->master_data->readreg(ptr->codec, ZR016_IDATA)) & 0xFF; // DATA value = (ptr->codec->master_data->readreg(ptr->codec, ZR016_IDATA)) & 0xFF;
} else { } else {
zrdev_err(zr, "%s: invalid I/O setup, nothing read (i)!\n", ptr->name); zrdev_err(zr, "%s: invalid I/O setup, nothing read (i)!\n", ptr->name);
} }
...@@ -88,18 +92,14 @@ static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) ...@@ -88,18 +92,14 @@ static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value)
/* just in case something is wrong... */ /* just in case something is wrong... */
if (ptr->codec->master_data->writereg) { if (ptr->codec->master_data->writereg) {
ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F); // ADDR ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F);
ptr->codec->master_data->writereg(ptr->codec, ZR016_IDATA, value & 0x0FF); // DATA ptr->codec->master_data->writereg(ptr->codec, ZR016_IDATA, value & 0x0FF);
} else { } else {
zrdev_err(zr, "%s: invalid I/O setup, nothing written (i)!\n", ptr->name); zrdev_err(zr, "%s: invalid I/O setup, nothing written (i)!\n", ptr->name);
} }
} }
/* ========================================================================= /* Local helper function: version read */
Local helper function:
version read
========================================================================= */
/* version kept in datastructure */ /* version kept in datastructure */
static u8 zr36016_read_version(struct zr36016 *ptr) static u8 zr36016_read_version(struct zr36016 *ptr)
...@@ -108,11 +108,10 @@ static u8 zr36016_read_version(struct zr36016 *ptr) ...@@ -108,11 +108,10 @@ static u8 zr36016_read_version(struct zr36016 *ptr)
return ptr->version; return ptr->version;
} }
/* ========================================================================= /*
Local helper function: * Local helper function: basic test of "connectivity", writes/reads
* to/from PAX-Lo register
basic test of "connectivity", writes/reads to/from PAX-Lo register */
========================================================================= */
static int zr36016_basic_test(struct zr36016 *ptr) static int zr36016_basic_test(struct zr36016 *ptr)
{ {
...@@ -150,36 +149,7 @@ static int zr36016_basic_test(struct zr36016 *ptr) ...@@ -150,36 +149,7 @@ static int zr36016_basic_test(struct zr36016 *ptr)
return 0; /* looks good! */ return 0; /* looks good! */
} }
/* ========================================================================= /* Basic datasets & init */
Local helper function:
simple loop for pushing the init datasets - NO USE --
========================================================================= */
#if 0
static int zr36016_pushit(struct zr36016 *ptr,
u16 startreg,
u16 len,
const char *data)
{
struct zoran *zr = videocodec_to_zoran(ptr->codec);
int i = 0;
zrdev_dbg(zr, "%s: write data block to 0x%04x (len=%d)\n",
ptr->name, startreg, len);
while (i < len) {
zr36016_writei(ptr, startreg++, data[i++]);
}
return i;
}
#endif
/* =========================================================================
Basic datasets & init:
//TODO//
========================================================================= */
static void zr36016_init(struct zr36016 *ptr) static void zr36016_init(struct zr36016 *ptr)
{ {
...@@ -213,14 +183,16 @@ static void zr36016_init(struct zr36016 *ptr) ...@@ -213,14 +183,16 @@ static void zr36016_init(struct zr36016 *ptr)
zr36016_write(ptr, ZR016_GOSTOP, 1); zr36016_write(ptr, ZR016_GOSTOP, 1);
} }
/* ========================================================================= /*
CODEC API FUNCTIONS * CODEC API FUNCTIONS
*
this functions are accessed by the master via the API structure * These functions are accessed by the master via the API structure
========================================================================= */ */
/* set compression/expansion mode and launches codec - /*
this should be the last call from the master before starting processing */ * set compression/expansion mode and launches codec -
* this should be the last call from the master before starting processing
*/
static int zr36016_set_mode(struct videocodec *codec, int mode) static int zr36016_set_mode(struct videocodec *codec, int mode)
{ {
struct zr36016 *ptr = (struct zr36016 *)codec->data; struct zr36016 *ptr = (struct zr36016 *)codec->data;
...@@ -249,22 +221,28 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm ...@@ -249,22 +221,28 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm
cap->x, cap->y, cap->width, cap->height, cap->x, cap->y, cap->width, cap->height,
cap->decimation); cap->decimation);
/* if () return -EINVAL; /*
* if () return -EINVAL;
* trust the master driver that it knows what it does - so * trust the master driver that it knows what it does - so
* we allow invalid startx/y for now ... */ * we allow invalid startx/y for now ...
*/
ptr->width = cap->width; ptr->width = cap->width;
ptr->height = cap->height; ptr->height = cap->height;
/* (Ronald) This is ugly. zoran_device.c, line 387 /*
* (Ronald) This is ugly. zoran_device.c, line 387
* already mentions what happens if h_start is even * already mentions what happens if h_start is even
* (blue faces, etc., cr/cb inversed). There's probably * (blue faces, etc., cr/cb inversed). There's probably
* some good reason why h_start is 0 instead of 1, so I'm * some good reason why h_start is 0 instead of 1, so I'm
* leaving it to this for now, but really... This can be * leaving it to this for now, but really... This can be
* done a lot simpler */ * done a lot simpler
*/
ptr->xoff = (norm->h_start ? norm->h_start : 1) + cap->x; ptr->xoff = (norm->h_start ? norm->h_start : 1) + cap->x;
/* Something to note here (I don't understand it), setting /*
* Something to note here (I don't understand it), setting
* v_start too high will cause the codec to 'not work'. I * v_start too high will cause the codec to 'not work'. I
* really don't get it. values of 16 (v_start) already break * really don't get it. values of 16 (v_start) already break
* it here. Just '0' seems to work. More testing needed! */ * it here. Just '0' seems to work. More testing needed!
*/
ptr->yoff = norm->v_start + cap->y; ptr->yoff = norm->v_start + cap->y;
/* (Ronald) dzjeeh, can't this thing do hor_decimation = 4? */ /* (Ronald) dzjeeh, can't this thing do hor_decimation = 4? */
ptr->xdec = ((cap->decimation & 0xff) == 1) ? 0 : 1; ptr->xdec = ((cap->decimation & 0xff) == 1) ? 0 : 1;
...@@ -319,11 +297,11 @@ static int zr36016_control(struct videocodec *codec, int type, int size, void *d ...@@ -319,11 +297,11 @@ static int zr36016_control(struct videocodec *codec, int type, int size, void *d
return size; return size;
} }
/* ========================================================================= /*
Exit and unregister function: * Exit and unregister function:
*
Deinitializes Zoran's JPEG processor * Deinitializes Zoran's JPEG processor
========================================================================= */ */
static int zr36016_unset(struct videocodec *codec) static int zr36016_unset(struct videocodec *codec)
{ {
...@@ -344,14 +322,14 @@ static int zr36016_unset(struct videocodec *codec) ...@@ -344,14 +322,14 @@ static int zr36016_unset(struct videocodec *codec)
return -EFAULT; return -EFAULT;
} }
/* ========================================================================= /*
Setup and registry function: * Setup and registry function:
*
Initializes Zoran's JPEG processor * Initializes Zoran's JPEG processor
*
Also sets pixel size, average code size, mode (compr./decompr.) * Also sets pixel size, average code size, mode (compr./decompr.)
(the given size is determined by the processor with the video interface) * (the given size is determined by the processor with the video interface)
========================================================================= */ */
static int zr36016_setup(struct videocodec *codec) static int zr36016_setup(struct videocodec *codec)
{ {
...@@ -410,9 +388,7 @@ static const struct videocodec zr36016_codec = { ...@@ -410,9 +388,7 @@ static const struct videocodec zr36016_codec = {
/* others are not used */ /* others are not used */
}; };
/* ========================================================================= /* HOOK IN DRIVER AS KERNEL MODULE */
HOOK IN DRIVER AS KERNEL MODULE
========================================================================= */
int zr36016_init_module(void) int zr36016_init_module(void)
{ {
......
This diff is collapsed.
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#define ZR36057_VFESPFR_RGB888 (1 << 3) #define ZR36057_VFESPFR_RGB888 (1 << 3)
#define ZR36057_VFESPFR_RGB565 (2 << 3) #define ZR36057_VFESPFR_RGB565 (2 << 3)
#define ZR36057_VFESPFR_RGB555 (3 << 3) #define ZR36057_VFESPFR_RGB555 (3 << 3)
#define ZR36057_VFESPFR_ERR_DIF (1 << 2) #define ZR36057_VFESPFR_ERR_DIF BIT(2)
#define ZR36057_VFESPFR_PACK24 (1 << 1) #define ZR36057_VFESPFR_PACK24 BIT(1)
#define ZR36057_VFESPFR_LITTLE_ENDIAN (1 << 0) #define ZR36057_VFESPFR_LITTLE_ENDIAN BIT(0)
#define ZR36057_VDTR 0x00c /* Video Display "Top" Register */ #define ZR36057_VDTR 0x00c /* Video Display "Top" Register */
......
...@@ -243,7 +243,10 @@ static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 0, 0 }; //table idx's AC ...@@ -243,7 +243,10 @@ static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 0, 0 }; //table idx's AC
static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 }; static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 };
static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 }; static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
/* SOF (start of frame) segment depends on width, height and sampling ratio of each color component */ /*
* SOF (start of frame) segment depends on width, height and sampling ratio
* of each color component
*/
static int zr36060_set_sof(struct zr36060 *ptr) static int zr36060_set_sof(struct zr36060 *ptr)
{ {
struct zoran *zr = videocodec_to_zoran(ptr->codec); struct zoran *zr = videocodec_to_zoran(ptr->codec);
...@@ -555,8 +558,6 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm ...@@ -555,8 +558,6 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm
reg = 6 - 1; /* VsyncSize */ reg = 6 - 1; /* VsyncSize */
zr36060_write(ptr, ZR060_SGR_VSYNC, reg); zr36060_write(ptr, ZR060_SGR_VSYNC, reg);
//reg = 30 - 1; /* HsyncSize */
///*CP*/ reg = (zr->params.norm == 1 ? 57 : 68);
reg = 68; reg = 68;
zr36060_write(ptr, ZR060_SGR_HSYNC, reg); zr36060_write(ptr, ZR060_SGR_HSYNC, reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment