Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271348
b: refs/heads/master
c: 36b0b1d
h: refs/heads/master
v: v3
  • Loading branch information
Timur Tabi authored and Florian Tobias Schandinat committed Oct 5, 2011
1 parent f814a63 commit e68e0d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 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: 6488867c0525c9189f2f0d18e9009529b4732782
refs/heads/master: 36b0b1d41541fc3b25faf38aa53c34cede357421
16 changes: 8 additions & 8 deletions trunk/drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,11 +966,19 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,
if (!arg)
return -EINVAL;
switch (cmd) {
case MFB_SET_PIXFMT_OLD:
dev_warn(info->dev,
"MFB_SET_PIXFMT value of 0x%08x is deprecated.\n",
MFB_SET_PIXFMT_OLD);
case MFB_SET_PIXFMT:
if (copy_from_user(&pix_fmt, buf, sizeof(pix_fmt)))
return -EFAULT;
ad->pix_fmt = pix_fmt;
break;
case MFB_GET_PIXFMT_OLD:
dev_warn(info->dev,
"MFB_GET_PIXFMT value of 0x%08x is deprecated.\n",
MFB_GET_PIXFMT_OLD);
case MFB_GET_PIXFMT:
pix_fmt = ad->pix_fmt;
if (copy_to_user(buf, &pix_fmt, sizeof(pix_fmt)))
Expand Down Expand Up @@ -1030,14 +1038,6 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,
ad->ckmin_b = ck.blue_min;
}
break;
case FBIOGET_GWINFO:
if (mfbi->type == MFB_TYPE_OFF)
return -ENODEV;
/* get graphic window information */
if (copy_to_user(buf, ad, sizeof(*ad)))
return -EFAULT;
break;

default:
dev_err(info->dev, "unknown ioctl command (0x%08X)\n", cmd);
return -ENOIOCTLCMD;
Expand Down
27 changes: 16 additions & 11 deletions trunk/include/linux/fsl-diu-fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,27 @@ struct mfb_chroma_key {
};

struct aoi_display_offset {
int x_aoi_d;
int y_aoi_d;
__s32 x_aoi_d;
__s32 y_aoi_d;
};

#define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key)
#define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8)
#define MFB_SET_ALPHA _IOW('M', 0, __u8)
#define MFB_GET_ALPHA _IOR('M', 0, __u8)
#define MFB_SET_AOID _IOW('M', 4, struct aoi_display_offset)
#define MFB_GET_AOID _IOR('M', 4, struct aoi_display_offset)
#define MFB_SET_PIXFMT _IOW('M', 8, __u32)
#define MFB_GET_PIXFMT _IOR('M', 8, __u32)

#define MFB_SET_ALPHA 0x80014d00
#define MFB_GET_ALPHA 0x40014d00
#define MFB_SET_AOID 0x80084d04
#define MFB_GET_AOID 0x40084d04
#define MFB_SET_PIXFMT 0x80014d08
#define MFB_GET_PIXFMT 0x40014d08

#define FBIOGET_GWINFO 0x46E0
#define FBIOPUT_GWINFO 0x46E1
/*
* The original definitions of MFB_SET_PIXFMT and MFB_GET_PIXFMT used the
* wrong value for 'size' field of the ioctl. The current macros above use the
* right size, but we still need to provide backwards compatibility, at least
* for a while.
*/
#define MFB_SET_PIXFMT_OLD 0x80014d08
#define MFB_GET_PIXFMT_OLD 0x40014d08

#ifdef __KERNEL__
#include <linux/spinlock.h>
Expand Down

0 comments on commit e68e0d8

Please sign in to comment.