Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249040
b: refs/heads/master
c: 9917294
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent 720b85d commit 39c9866
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad9f792e67c0a0522bb78109bc979197c9756fcc
refs/heads/master: 99172946238c77160c97cc71b68bb0004c00aed2
2 changes: 1 addition & 1 deletion trunk/drivers/staging/gma500/psb_2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int psb_2d_wait_available(struct drm_psb_private *dev_priv,
/* FIXME: Remember if we expose the 2D engine to the DRM we need to serialize
it with console use */

static int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,
int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,
unsigned size)
{
int ret = 0;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/staging/gma500/psb_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ extern int psbfb_sync(struct fb_info *info);

extern void psb_spank(struct drm_psb_private *dev_priv);

extern int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,
unsigned size);

/*
*psb_reset.c
*/
Expand Down
26 changes: 26 additions & 0 deletions trunk/drivers/staging/gma500/psb_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,31 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
return 0;
}

static int psbfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct psb_fbdev *fbdev = info->par;
struct psb_framebuffer *psbfb = fbdev->pfb;
struct drm_device *dev = psbfb->base.dev;
struct drm_psb_private *dev_priv = dev->dev_private;
u32 __user *p = (u32 __user *)arg;
u32 l;
u32 buf[32];
switch (cmd) {
case 0x12345678:
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if (get_user(l, p))
return -EFAULT;
if (l > 32)
return -EMSGSIZE;
if (copy_from_user(buf, p + 1, l))
return -EFAULT;
psbfb_2d_submit(dev_priv, buf, l);
return 0;
default:
return -ENOTTY;
}
}

static struct fb_ops psbfb_ops = {
.owner = THIS_MODULE,
Expand All @@ -282,6 +307,7 @@ static struct fb_ops psbfb_ops = {
.fb_imageblit = psbfb_imageblit,
.fb_mmap = psbfb_mmap,
.fb_sync = psbfb_sync,
.fb_ioctl = psbfb_ioctl,
};

static struct drm_framebuffer *psb_framebuffer_create
Expand Down

0 comments on commit 39c9866

Please sign in to comment.