Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193569
b: refs/heads/master
c: c2b12cd
h: refs/heads/master
i:
  193567: 845ee18
v: v3
  • Loading branch information
Jonathan Corbet committed May 7, 2010
1 parent f6d922d commit 98189e3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d28eb42c52a799c806082e6d856f634ed1db902
refs/heads/master: c2b12cd496bbe5eff6a48bc669fe6b0c56f2b3d9
16 changes: 16 additions & 0 deletions trunk/drivers/video/via/accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@ int viafb_init_engine(struct fb_info *info)
viapar->shared->vq_vram_addr = viapar->fbmem_free;
viapar->fbmem_used += VQ_SIZE;

#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE)
/*
* Set aside a chunk of framebuffer memory for the camera
* driver. Someday this driver probably needs a proper allocator
* for fbmem; for now, we just have to do this before the
* framebuffer initializes itself.
*
* As for the size: the engine can handle three frames,
* 16 bits deep, up to VGA resolution.
*/
viapar->shared->vdev->camera_fbmem_size = 3*VGA_HEIGHT*VGA_WIDTH*2;
viapar->fbmem_free -= viapar->shared->vdev->camera_fbmem_size;
viapar->fbmem_used += viapar->shared->vdev->camera_fbmem_size;
viapar->shared->vdev->camera_fbmem_offset = viapar->fbmem_free;
#endif

/* Init AGP and VQ regs */
switch (chip_name) {
case UNICHROME_K8M890:
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/video/via/via-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ struct viafb_dev {
unsigned long fbmem_start;
long fbmem_len;
void __iomem *fbmem;
#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE)
long camera_fbmem_offset;
long camera_fbmem_size;
#endif
/*
* The MMIO region for device registers.
*/
Expand Down Expand Up @@ -160,4 +164,10 @@ int viafb_dma_copy_out_sg(unsigned int offset, struct scatterlist *sg, int nsg);
#define VDMA_DPRH0 0xe38
#define VDMA_PMR0 (0xe00 + 0x134) /* Pitch mode */

/*
* Useful stuff that probably belongs somewhere global.
*/
#define VGA_WIDTH 640
#define VGA_HEIGHT 480

#endif /* __VIA_CORE_H__ */

0 comments on commit 98189e3

Please sign in to comment.