drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()
Drivers shouldn't clobber the passed in addfb ioctl parameters. i915 was doing just that. To prevent it from happening again, pass the struct around as const, starting all the way from internal_framebuffer_create(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cc344980c7
commit
1eb83451ba
|
@ -481,7 +481,7 @@ static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
|
|||
int
|
||||
amdgpu_framebuffer_init(struct drm_device *dev,
|
||||
struct amdgpu_framebuffer *rfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -498,7 +498,7 @@ amdgpu_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
amdgpu_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct amdgpu_framebuffer *amdgpu_fb;
|
||||
|
|
|
@ -551,7 +551,7 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
|
|||
|
||||
int amdgpu_framebuffer_init(struct drm_device *dev,
|
||||
struct amdgpu_framebuffer *rfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
|
||||
int amdgpufb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
|
||||
|
|
|
@ -35,7 +35,7 @@ static const struct drm_framebuffer_funcs armada_fb_funcs = {
|
|||
};
|
||||
|
||||
struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj)
|
||||
const struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj)
|
||||
{
|
||||
struct armada_framebuffer *dfb;
|
||||
uint8_t format, config;
|
||||
|
@ -101,7 +101,7 @@ struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
|
|||
}
|
||||
|
||||
static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
|
||||
struct drm_file *dfile, struct drm_mode_fb_cmd2 *mode)
|
||||
struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode)
|
||||
{
|
||||
struct armada_gem_object *obj;
|
||||
struct armada_framebuffer *dfb;
|
||||
|
|
|
@ -19,6 +19,6 @@ struct armada_framebuffer {
|
|||
#define drm_fb_obj(fb) drm_fb_to_armada_fb(fb)->obj
|
||||
|
||||
struct armada_framebuffer *armada_framebuffer_create(struct drm_device *,
|
||||
struct drm_mode_fb_cmd2 *, struct armada_gem_object *);
|
||||
const struct drm_mode_fb_cmd2 *, struct armada_gem_object *);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -308,7 +308,7 @@ extern void ast_mode_fini(struct drm_device *dev);
|
|||
|
||||
int ast_framebuffer_init(struct drm_device *dev,
|
||||
struct ast_framebuffer *ast_fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
|
||||
int ast_fbdev_init(struct drm_device *dev);
|
||||
|
|
|
@ -163,7 +163,7 @@ static struct fb_ops astfb_ops = {
|
|||
};
|
||||
|
||||
static int astfb_create_object(struct ast_fbdev *afbdev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **gobj_p)
|
||||
{
|
||||
struct drm_device *dev = afbdev->helper.dev;
|
||||
|
|
|
@ -309,7 +309,7 @@ static const struct drm_framebuffer_funcs ast_fb_funcs = {
|
|||
|
||||
int ast_framebuffer_init(struct drm_device *dev,
|
||||
struct ast_framebuffer *ast_fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -327,7 +327,7 @@ int ast_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
ast_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct ast_framebuffer *ast_fb;
|
||||
|
|
|
@ -402,7 +402,7 @@ static irqreturn_t atmel_hlcdc_dc_irq_handler(int irq, void *data)
|
|||
}
|
||||
|
||||
static struct drm_framebuffer *atmel_hlcdc_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
return drm_fb_cma_create(dev, file_priv, mode_cmd);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
|
|||
|
||||
int bochs_framebuffer_init(struct drm_device *dev,
|
||||
struct bochs_framebuffer *gfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr);
|
||||
int bochs_bo_unpin(struct bochs_bo *bo);
|
||||
|
|
|
@ -34,7 +34,7 @@ static struct fb_ops bochsfb_ops = {
|
|||
};
|
||||
|
||||
static int bochsfb_create_object(struct bochs_device *bochs,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **gobj_p)
|
||||
{
|
||||
struct drm_device *dev = bochs->dev;
|
||||
|
|
|
@ -484,7 +484,7 @@ static const struct drm_framebuffer_funcs bochs_fb_funcs = {
|
|||
|
||||
int bochs_framebuffer_init(struct drm_device *dev,
|
||||
struct bochs_framebuffer *gfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -502,7 +502,7 @@ int bochs_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
bochs_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct bochs_framebuffer *bochs_fb;
|
||||
|
|
|
@ -206,7 +206,7 @@ int cirrus_dumb_create(struct drm_file *file,
|
|||
|
||||
int cirrus_framebuffer_init(struct drm_device *dev,
|
||||
struct cirrus_framebuffer *gfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
|
||||
bool cirrus_check_framebuffer(struct cirrus_device *cdev, int width, int height,
|
||||
|
|
|
@ -135,7 +135,7 @@ static struct fb_ops cirrusfb_ops = {
|
|||
};
|
||||
|
||||
static int cirrusfb_create_object(struct cirrus_fbdev *afbdev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **gobj_p)
|
||||
{
|
||||
struct drm_device *dev = afbdev->helper.dev;
|
||||
|
|
|
@ -29,7 +29,7 @@ static const struct drm_framebuffer_funcs cirrus_fb_funcs = {
|
|||
|
||||
int cirrus_framebuffer_init(struct drm_device *dev,
|
||||
struct cirrus_framebuffer *gfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -47,7 +47,7 @@ int cirrus_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
cirrus_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct cirrus_device *cdev = dev->dev_private;
|
||||
struct drm_gem_object *obj;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
static struct drm_framebuffer *
|
||||
internal_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *r,
|
||||
const struct drm_mode_fb_cmd2 *r,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* Avoid boilerplate. I'm tired of typing. */
|
||||
|
@ -3235,7 +3235,7 @@ static int framebuffer_check(const struct drm_mode_fb_cmd2 *r)
|
|||
|
||||
static struct drm_framebuffer *
|
||||
internal_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *r,
|
||||
const struct drm_mode_fb_cmd2 *r,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_mode_config *config = &dev->mode_config;
|
||||
|
|
|
@ -818,7 +818,7 @@ EXPORT_SYMBOL(drm_helper_connector_dpms);
|
|||
* metadata fields.
|
||||
*/
|
||||
void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ static struct drm_framebuffer_funcs drm_fb_cma_funcs = {
|
|||
};
|
||||
|
||||
static struct drm_fb_cma *drm_fb_cma_alloc(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_cma_object **obj,
|
||||
const const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_cma_object **obj,
|
||||
unsigned int num_planes)
|
||||
{
|
||||
struct drm_fb_cma *fb_cma;
|
||||
|
@ -107,7 +107,7 @@ static struct drm_fb_cma *drm_fb_cma_alloc(struct drm_device *dev,
|
|||
* checked before calling this function.
|
||||
*/
|
||||
struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_fb_cma *fb_cma;
|
||||
struct drm_gem_cma_object *objs[4];
|
||||
|
|
|
@ -117,7 +117,7 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
|
|||
|
||||
struct drm_framebuffer *
|
||||
exynos_drm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct exynos_drm_gem **exynos_gem,
|
||||
int count)
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
|
|||
|
||||
static struct drm_framebuffer *
|
||||
exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];
|
||||
struct drm_gem_object *obj;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
struct drm_framebuffer *
|
||||
exynos_drm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct exynos_drm_gem **exynos_gem,
|
||||
int count);
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ static struct fb_ops psbfb_unaccel_ops = {
|
|||
*/
|
||||
static int psb_framebuffer_init(struct drm_device *dev,
|
||||
struct psb_framebuffer *fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct gtt_range *gt)
|
||||
{
|
||||
u32 bpp, depth;
|
||||
|
@ -284,7 +284,7 @@ static int psb_framebuffer_init(struct drm_device *dev,
|
|||
|
||||
static struct drm_framebuffer *psb_framebuffer_create
|
||||
(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct gtt_range *gt)
|
||||
{
|
||||
struct psb_framebuffer *fb;
|
||||
|
@ -488,7 +488,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
|
|||
*/
|
||||
static struct drm_framebuffer *psb_user_framebuffer_create
|
||||
(struct drm_device *dev, struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *cmd)
|
||||
const struct drm_mode_fb_cmd2 *cmd)
|
||||
{
|
||||
struct gtt_range *r;
|
||||
struct drm_gem_object *obj;
|
||||
|
|
|
@ -14377,7 +14377,7 @@ static int intel_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
intel_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *user_mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *user_mode_cmd)
|
||||
{
|
||||
struct drm_i915_gem_object *obj;
|
||||
struct drm_mode_fb_cmd2 mode_cmd = *user_mode_cmd;
|
||||
|
|
|
@ -252,7 +252,7 @@ void mgag200_fbdev_fini(struct mga_device *mdev);
|
|||
/* mgag200_main.c */
|
||||
int mgag200_framebuffer_init(struct drm_device *dev,
|
||||
struct mga_framebuffer *mfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ static struct fb_ops mgag200fb_ops = {
|
|||
};
|
||||
|
||||
static int mgag200fb_create_object(struct mga_fbdev *afbdev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **gobj_p)
|
||||
{
|
||||
struct drm_device *dev = afbdev->helper.dev;
|
||||
|
|
|
@ -29,7 +29,7 @@ static const struct drm_framebuffer_funcs mga_fb_funcs = {
|
|||
|
||||
int mgag200_framebuffer_init(struct drm_device *dev,
|
||||
struct mga_framebuffer *gfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -47,7 +47,7 @@ int mgag200_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
mgag200_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *filp,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct mga_framebuffer *mga_fb;
|
||||
|
|
|
@ -240,9 +240,9 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, int id, int plane);
|
|||
struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane);
|
||||
const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb);
|
||||
struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
||||
struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev);
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
|
|||
}
|
||||
|
||||
struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *bos[4] = {0};
|
||||
struct drm_framebuffer *fb;
|
||||
|
@ -168,7 +168,7 @@ struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
|
|||
}
|
||||
|
||||
struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_kms *kms = priv->kms;
|
||||
|
|
|
@ -246,7 +246,7 @@ static const struct drm_framebuffer_funcs nouveau_framebuffer_funcs = {
|
|||
int
|
||||
nouveau_framebuffer_init(struct drm_device *dev,
|
||||
struct nouveau_framebuffer *nv_fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct nouveau_bo *nvbo)
|
||||
{
|
||||
struct nouveau_display *disp = nouveau_display(dev);
|
||||
|
@ -272,7 +272,7 @@ nouveau_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
nouveau_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct nouveau_framebuffer *nouveau_fb;
|
||||
struct drm_gem_object *gem;
|
||||
|
|
|
@ -23,7 +23,7 @@ nouveau_framebuffer(struct drm_framebuffer *fb)
|
|||
}
|
||||
|
||||
int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
|
||||
struct drm_mode_fb_cmd2 *, struct nouveau_bo *);
|
||||
const struct drm_mode_fb_cmd2 *, struct nouveau_bo *);
|
||||
|
||||
struct nouveau_page_flip_state {
|
||||
struct list_head head;
|
||||
|
|
|
@ -172,9 +172,9 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
|
|||
uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats,
|
||||
uint32_t max_formats, enum omap_color_mode supported_modes);
|
||||
struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
||||
struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p);
|
||||
int omap_framebuffer_pin(struct drm_framebuffer *fb);
|
||||
void omap_framebuffer_unpin(struct drm_framebuffer *fb);
|
||||
|
@ -248,7 +248,7 @@ struct omap_dss_device *omap_encoder_get_dssdev(struct drm_encoder *encoder);
|
|||
|
||||
static inline int objects_lookup(struct drm_device *dev,
|
||||
struct drm_file *filp, uint32_t pixel_format,
|
||||
struct drm_gem_object **bos, uint32_t *handles)
|
||||
struct drm_gem_object **bos, const uint32_t *handles)
|
||||
{
|
||||
int i, n = drm_format_num_planes(pixel_format);
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@ void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m)
|
|||
#endif
|
||||
|
||||
struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *bos[4];
|
||||
struct drm_framebuffer *fb;
|
||||
|
@ -386,7 +386,7 @@ struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
|
|||
}
|
||||
|
||||
struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos)
|
||||
{
|
||||
struct omap_framebuffer *omap_fb = NULL;
|
||||
struct drm_framebuffer *fb = NULL;
|
||||
|
|
|
@ -521,7 +521,7 @@ static const struct drm_framebuffer_funcs qxl_fb_funcs = {
|
|||
int
|
||||
qxl_framebuffer_init(struct drm_device *dev,
|
||||
struct qxl_framebuffer *qfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1003,7 +1003,7 @@ static int qdev_output_init(struct drm_device *dev, int num_output)
|
|||
static struct drm_framebuffer *
|
||||
qxl_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct qxl_framebuffer *qxl_fb;
|
||||
|
|
|
@ -390,7 +390,7 @@ void qxl_fbdev_set_suspend(struct qxl_device *qdev, int state);
|
|||
int
|
||||
qxl_framebuffer_init(struct drm_device *dev,
|
||||
struct qxl_framebuffer *rfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
void qxl_display_read_client_monitors_config(struct qxl_device *qdev);
|
||||
void qxl_send_monitors_config(struct qxl_device *qdev);
|
||||
|
|
|
@ -282,7 +282,7 @@ int qxl_get_handle_for_primary_fb(struct qxl_device *qdev,
|
|||
}
|
||||
|
||||
static int qxlfb_create_pinned_object(struct qxl_fbdev *qfbdev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **gobj_p)
|
||||
{
|
||||
struct qxl_device *qdev = qfbdev->qdev;
|
||||
|
|
|
@ -1292,7 +1292,7 @@ static const struct drm_framebuffer_funcs radeon_fb_funcs = {
|
|||
int
|
||||
radeon_framebuffer_init(struct drm_device *dev,
|
||||
struct radeon_framebuffer *rfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1309,7 +1309,7 @@ radeon_framebuffer_init(struct drm_device *dev,
|
|||
static struct drm_framebuffer *
|
||||
radeon_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct radeon_framebuffer *radeon_fb;
|
||||
|
|
|
@ -929,7 +929,7 @@ extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green
|
|||
u16 *blue, int regno);
|
||||
int radeon_framebuffer_init(struct drm_device *dev,
|
||||
struct radeon_framebuffer *rfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
|
||||
int radeonfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
|
||||
|
|
|
@ -136,7 +136,7 @@ int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev,
|
|||
|
||||
static struct drm_framebuffer *
|
||||
rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct rcar_du_device *rcdu = dev->dev_private;
|
||||
const struct rcar_du_format_info *format;
|
||||
|
|
|
@ -72,7 +72,7 @@ static struct drm_framebuffer_funcs rockchip_drm_fb_funcs = {
|
|||
};
|
||||
|
||||
static struct rockchip_drm_fb *
|
||||
rockchip_fb_alloc(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object **obj, unsigned int num_planes)
|
||||
{
|
||||
struct rockchip_drm_fb *rockchip_fb;
|
||||
|
@ -102,7 +102,7 @@ rockchip_fb_alloc(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd,
|
|||
|
||||
static struct drm_framebuffer *
|
||||
rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct rockchip_drm_fb *rockchip_fb;
|
||||
struct drm_gem_object *objs[ROCKCHIP_MAX_FB_BUFFER];
|
||||
|
@ -173,7 +173,7 @@ static const struct drm_mode_config_funcs rockchip_drm_mode_config_funcs = {
|
|||
|
||||
struct drm_framebuffer *
|
||||
rockchip_drm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
struct rockchip_drm_fb *rockchip_fb;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
struct drm_framebuffer *
|
||||
rockchip_drm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
void rockchip_drm_framebuffer_fini(struct drm_framebuffer *fb);
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ const struct shmob_drm_format_info *shmob_drm_format_info(u32 fourcc)
|
|||
|
||||
static struct drm_framebuffer *
|
||||
shmob_drm_fb_create(struct drm_device *dev, struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
const struct shmob_drm_format_info *format;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
|
|||
struct tegra_bo_tiling *tiling);
|
||||
struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
|
||||
struct drm_file *file,
|
||||
struct drm_mode_fb_cmd2 *cmd);
|
||||
const struct drm_mode_fb_cmd2 *cmd);
|
||||
int tegra_drm_fb_prepare(struct drm_device *drm);
|
||||
void tegra_drm_fb_free(struct drm_device *drm);
|
||||
int tegra_drm_fb_init(struct drm_device *drm);
|
||||
|
|
|
@ -92,7 +92,7 @@ static struct drm_framebuffer_funcs tegra_fb_funcs = {
|
|||
};
|
||||
|
||||
static struct tegra_fb *tegra_fb_alloc(struct drm_device *drm,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct tegra_bo **planes,
|
||||
unsigned int num_planes)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ static struct tegra_fb *tegra_fb_alloc(struct drm_device *drm,
|
|||
|
||||
struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
|
||||
struct drm_file *file,
|
||||
struct drm_mode_fb_cmd2 *cmd)
|
||||
const struct drm_mode_fb_cmd2 *cmd)
|
||||
{
|
||||
unsigned int hsub, vsub, i;
|
||||
struct tegra_bo *planes[4];
|
||||
|
|
|
@ -46,7 +46,7 @@ void tilcdc_module_cleanup(struct tilcdc_module *mod)
|
|||
static struct of_device_id tilcdc_of_match[];
|
||||
|
||||
static struct drm_framebuffer *tilcdc_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
return drm_fb_cma_create(dev, file_priv, mode_cmd);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ void udl_fbdev_unplug(struct drm_device *dev);
|
|||
struct drm_framebuffer *
|
||||
udl_fb_user_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
int udl_render_hline(struct drm_device *dev, int bpp, struct urb **urb_ptr,
|
||||
const char *front, char **urb_buf_ptr,
|
||||
|
|
|
@ -455,7 +455,7 @@ static const struct drm_framebuffer_funcs udlfb_funcs = {
|
|||
static int
|
||||
udl_framebuffer_init(struct drm_device *dev,
|
||||
struct udl_framebuffer *ufb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct udl_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -623,7 +623,7 @@ void udl_fbdev_unplug(struct drm_device *dev)
|
|||
struct drm_framebuffer *
|
||||
udl_fb_user_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct udl_framebuffer *ufb;
|
||||
|
|
|
@ -215,7 +215,7 @@ static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
|
|||
int
|
||||
virtio_gpu_framebuffer_init(struct drm_device *dev,
|
||||
struct virtio_gpu_framebuffer *vgfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj)
|
||||
{
|
||||
int ret;
|
||||
|
@ -465,7 +465,7 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
|
|||
static struct drm_framebuffer *
|
||||
virtio_gpu_user_framebuffer_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
struct drm_gem_object *obj = NULL;
|
||||
struct virtio_gpu_framebuffer *virtio_gpu_fb;
|
||||
|
|
|
@ -328,7 +328,7 @@ void virtio_gpu_dequeue_fence_func(struct work_struct *work);
|
|||
/* virtio_gpu_display.c */
|
||||
int virtio_gpu_framebuffer_init(struct drm_device *dev,
|
||||
struct virtio_gpu_framebuffer *vgfb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd,
|
||||
struct drm_gem_object *obj);
|
||||
int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev);
|
||||
void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev);
|
||||
|
|
|
@ -930,7 +930,7 @@ vmw_kms_new_framebuffer(struct vmw_private *dev_priv,
|
|||
|
||||
static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd2)
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd2)
|
||||
{
|
||||
struct vmw_private *dev_priv = vmw_priv(dev);
|
||||
struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile;
|
||||
|
|
|
@ -996,7 +996,7 @@ struct drm_mode_set {
|
|||
struct drm_mode_config_funcs {
|
||||
struct drm_framebuffer *(*fb_create)(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
void (*output_poll_changed)(struct drm_device *dev);
|
||||
|
||||
int (*atomic_check)(struct drm_device *dev,
|
||||
|
|
|
@ -197,7 +197,7 @@ extern int drm_helper_connector_dpms(struct drm_connector *connector, int mode);
|
|||
extern void drm_helper_move_panel_connectors_to_head(struct drm_device *);
|
||||
|
||||
extern void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
|
||||
const struct drm_crtc_helper_funcs *funcs)
|
||||
|
|
|
@ -18,7 +18,7 @@ void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
|
|||
void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
|
||||
|
||||
struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
|
||||
unsigned int plane);
|
||||
|
|
Loading…
Reference in New Issue