From: yxj Date: Wed, 30 Jan 2013 08:10:26 +0000 (+0800) Subject: rk fb:rename rk fb specified ioctl X-Git-Tag: firefly_0821_release~7682 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=14c56b9767ebd0d2ec4923cf0a9210a652fabc33;p=firefly-linux-kernel-4.4.55.git rk fb:rename rk fb specified ioctl --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index b12bc66945af..35abf4153238 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -284,7 +284,8 @@ static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd,unsigned long arg) { case FBIOPUT_FBPHYADD: return info->fix.smem_start; - case FBIOSET_YUV_ADDR: //when in video mode, buff alloc by android + break; + case RK_FBIOSET_YUV_ADDR: //when in video mode, buff alloc by android //if((!strcmp(fix->id,"fb1"))||(!strcmp(fix->id,"fb3"))) { if (copy_from_user(yuv_phy, argp, 8)) @@ -293,44 +294,32 @@ static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd,unsigned long arg) info->fix.mmio_start = yuv_phy[1]; //four uv } break; - case FBIOSET_ENABLE: + case RK_FBIOSET_ENABLE: if (copy_from_user(&enable, argp, sizeof(enable))) return -EFAULT; dev_drv->open(dev_drv,layer_id,enable); break; - case FBIOGET_ENABLE: + case RK_FBIOGET_ENABLE: enable = dev_drv->get_layer_state(dev_drv,layer_id); if(copy_to_user(argp,&enable,sizeof(enable))) return -EFAULT; break; - case FBIOSET_OVERLAY_STATE: + case RK_FBIOSET_OVERLAY_STATE: if (copy_from_user(&ovl, argp, sizeof(ovl))) return -EFAULT; dev_drv->ovl_mgr(dev_drv,ovl,1); break; - case FBIOGET_OVERLAY_STATE: + case RK_FBIOGET_OVERLAY_STATE: ovl = dev_drv->ovl_mgr(dev_drv,0,0); if (copy_to_user(argp, &ovl, sizeof(ovl))) return -EFAULT; break; - case FBIOPUT_NUM_BUFFERS: + case RK_FBIOPUT_NUM_BUFFERS: if (copy_from_user(&num_buf, argp, sizeof(num_buf))) return -EFAULT; dev_drv->num_buf = num_buf; printk("rk fb use %d buffers\n",num_buf); break; - case FBIOGET_SCREEN_STATE: - case FBIOPUT_SET_CURSOR_EN: - case FBIOPUT_SET_CURSOR_POS: - case FBIOPUT_SET_CURSOR_IMG: - case FBIOPUT_SET_CURSOR_CMAP: - case FBIOPUT_GET_CURSOR_RESOLUTION: - case FBIOPUT_GET_CURSOR_EN: - case FB0_IOCTL_STOP_TIMER_FLUSH: //stop timer flush mcu panel after android is runing - case FBIOPUT_16OR32: - case FBIOGET_16OR32: - case FBIOGET_IDLEFBUff_16OR32: - case FBIOSET_COMPOSE_LAYER_COUNTS: default: dev_drv->ioctl(dev_drv,cmd,arg,layer_id); break; diff --git a/include/linux/fb.h b/include/linux/fb.h index 5a24a1470b01..677d0c420f54 100755 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -27,7 +27,6 @@ #define FBIOPUT_SET_CURSOR_CMAP 0x460c #define FBIOPUT_GET_CURSOR_RESOLUTION 0x460d #define FBIOPUT_GET_CURSOR_EN 0x460e -#define FBIOPUT_NUM_BUFFERS 0x4625 #ifdef __KERNEL__ #define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user) @@ -49,12 +48,8 @@ #define FBIOPUT_MODEINFO 0x4617 #define FBIOGET_DISPINFO 0x4618 #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) -#define FBIOGET_OVERLAY_STATE 0X4619 -#define FBIOGET_SCREEN_STATE 0X4620 -#define FBIOGET_16OR32 0X4621 -#define FBIOGET_IDLEFBUff_16OR32 0X4622 -#define FBIOSET_COMPOSE_LAYER_COUNTS 0X4623 -#define FBIOGET_COMPOSE_LAYER_COUNTS 0X4624 + + #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ diff --git a/include/linux/rk_fb.h b/include/linux/rk_fb.h index 8a220269a78c..1a7e1fc9c123 100644 --- a/include/linux/rk_fb.h +++ b/include/linux/rk_fb.h @@ -42,17 +42,23 @@ #define FB0_IOCTL_CLOSE_BUF 0x6019 #endif -#define FBIOGET_PANEL_SIZE 0x5001 -#define FBIOSET_YUV_ADDR 0x5002 -//#define FB1_TOCTL_SET_MCU_DIR 0x5003 -#define FBIOSET_ROTATE 0x5003 -#define FB_IOCTL_SET_I2P_ODD_ADDR 0x5005 -#define FB_IOCTL_SET_I2P_EVEN_ADDR 0x5006 -#define FBIOSET_OVERLAY_STATE 0x5018 -#define FBIOSET_ENABLE 0x5019 -#define FBIOGET_ENABLE 0x5020 +#define RK_FBIOGET_PANEL_SIZE 0x5001 +#define RK_FBIOSET_YUV_ADDR 0x5002 +#define RK_FBIOGET_SCREEN_STATE 0X4620 +#define RK_FBIOGET_16OR32 0X4621 +#define RK_FBIOGET_IDLEFBUff_16OR32 0X4622 +#define RK_FBIOSET_COMPOSE_LAYER_COUNTS 0X4623 + +#define RK_FBIOSET_ROTATE 0x5003 +#define RK_FB_IOCTL_SET_I2P_ODD_ADDR 0x5005 +#define RK_FB_IOCTL_SET_I2P_EVEN_ADDR 0x5006 +#define RK_FBIOSET_OVERLAY_STATE 0x5018 +#define RK_FBIOGET_OVERLAY_STATE 0X4619 +#define RK_FBIOSET_ENABLE 0x5019 +#define RK_FBIOGET_ENABLE 0x5020 #define RK_FBIOSET_CONFIG_DONE 0x4628 #define RK_FBIOSET_VSYNC_ENABLE 0x4629 +#define RK_FBIOPUT_NUM_BUFFERS 0x4625 /********************************************************************