mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 22:53:20 +00:00
gma500: Cursor interface
We need to provide an interface to create additional buffers for the cursor Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
66dca5178c
commit
c5c44531ad
@ -250,3 +250,14 @@ fail:
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* GEM interfaces for our specific client
|
||||
*/
|
||||
int psb_gem_create_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file)
|
||||
{
|
||||
struct drm_psb_gem_create *args = data;
|
||||
return psb_gem_create(file, dev, args->size, &args->handle);
|
||||
}
|
||||
|
||||
|
@ -159,18 +159,11 @@ struct drm_psb_register_rw_arg {
|
||||
* corresponding defines where they're
|
||||
* defined elsewhere.
|
||||
*/
|
||||
#define DRM_PVR_RESERVED1 0x12
|
||||
#define DRM_PVR_RESERVED2 0x13
|
||||
#define DRM_PVR_RESERVED3 0x14
|
||||
#define DRM_PVR_RESERVED4 0x15
|
||||
#define DRM_PVR_RESERVED5 0x16
|
||||
|
||||
#define DRM_PSB_GEM_CREATE 0x10
|
||||
#define DRM_PSB_DPST 0x1B
|
||||
#define DRM_PSB_GAMMA 0x1C
|
||||
#define DRM_PSB_DPST_BL 0x1D
|
||||
|
||||
#define DRM_PVR_RESERVED6 0x1E
|
||||
|
||||
#define DRM_PSB_GET_PIPE_FROM_CRTC_ID 0x1F
|
||||
|
||||
#define PSB_MODE_OPERATION_MODE_VALID 0x01
|
||||
@ -191,4 +184,10 @@ struct psb_drm_dpu_rect {
|
||||
int width, height;
|
||||
};
|
||||
|
||||
struct drm_psb_gem_create {
|
||||
__u64 size;
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -121,6 +121,9 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
|
||||
#define DRM_IOCTL_PSB_GET_PIPE_FROM_CRTC_ID \
|
||||
DRM_IOWR(DRM_PSB_GET_PIPE_FROM_CRTC_ID + DRM_COMMAND_BASE, \
|
||||
struct drm_psb_get_pipe_from_crtc_id_arg)
|
||||
#define DRM_IOCTL_PSB_GEM_CREATE \
|
||||
DRM_IOWR(DRM_PSB_GEM_CREATE + DRM_COMMAND_BASE, \
|
||||
struct drm_psb_gem_create)
|
||||
|
||||
static int psb_sizes_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
@ -159,6 +162,8 @@ static struct drm_ioctl_desc psb_ioctls[] = {
|
||||
PSB_IOCTL_DEF(DRM_IOCTL_PSB_DPST_BL, psb_dpst_bl_ioctl, DRM_AUTH),
|
||||
PSB_IOCTL_DEF(DRM_IOCTL_PSB_GET_PIPE_FROM_CRTC_ID,
|
||||
psb_intel_get_pipe_from_crtc_id, 0),
|
||||
PSB_IOCTL_DEF(DRM_IOCTL_PSB_GEM_CREATE, psb_gem_create_ioctl,
|
||||
DRM_UNLOCKED | DRM_AUTH),
|
||||
|
||||
};
|
||||
|
||||
|
@ -782,18 +782,20 @@ extern const struct drm_connector_helper_funcs
|
||||
psb_intel_lvds_connector_helper_funcs;
|
||||
extern const struct drm_connector_funcs psb_intel_lvds_connector_funcs;
|
||||
|
||||
/* psb_gem.c */
|
||||
/* gem.c */
|
||||
extern int psb_gem_init_object(struct drm_gem_object *obj);
|
||||
extern void psb_gem_free_object(struct drm_gem_object *obj);
|
||||
extern int psb_gem_get_aperture(struct drm_device *dev, void *data,
|
||||
struct drm_file *file);
|
||||
struct drm_file *file);
|
||||
extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args);
|
||||
extern int psb_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
|
||||
uint32_t handle);
|
||||
extern int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
|
||||
uint32_t handle, uint64_t *offset);
|
||||
uint32_t handle, uint64_t *offset);
|
||||
extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
|
||||
extern int psb_gem_create_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file);
|
||||
|
||||
/* psb_device.c */
|
||||
extern const struct psb_ops psb_chip_ops;
|
||||
|
Loading…
Reference in New Issue
Block a user