summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/cirrus/cirrus_drv.h
diff options
context:
space:
mode:
authorTakashi Iwai2015-02-03 17:51:23 +0100
committerDave Airlie2015-02-05 01:39:00 +0100
commit7f551b1eee63dca6571fc44329b807aab7d5fc5c (patch)
tree4fe22dfc2ac989d274fe7ec991ddc2c4205daf50 /drivers/gpu/drm/cirrus/cirrus_drv.h
parentMerge tag 'drm-amdkfd-fixes-2015-02-02' of git://people.freedesktop.org/~gabb... (diff)
downloadkernel-qcow2-linux-7f551b1eee63dca6571fc44329b807aab7d5fc5c.tar.gz
kernel-qcow2-linux-7f551b1eee63dca6571fc44329b807aab7d5fc5c.tar.xz
kernel-qcow2-linux-7f551b1eee63dca6571fc44329b807aab7d5fc5c.zip
drm/cirrus: Limit modes depending on bpp option
The commit [8975626ea35a: drm/cirrus: allow 32bpp framebuffers for cirrus drm] broke X modesetting driver because cirrus driver still provides the full list of modes up to 1280x1024 while the 32bpp can support only up to 800x600. We might be able to filter out the invalid modes in mode_valid callback, but unfortunately the bpp in question can't be referred there for now (let me know if there is a better way to retrieve the bpp for the probed fb). So, instead, this patch adds the bpp module option to specify the maximal bpp explicitly and limits the resolutions in get_modes depending on its value. The default value is set to 24 so that the existing stuff keeps working. If you need a new 32bpp feature, specify cirrus.bpp=32 option explicitly. Fixes: 8975626ea35a ('drm/cirrus: allow 32bpp framebuffers for cirrus drm') Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/cirrus/cirrus_drv.h')
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index 693a4565c4ff..705061537a27 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -262,4 +262,7 @@ static inline void cirrus_bo_unreserve(struct cirrus_bo *bo)
int cirrus_bo_push_sysram(struct cirrus_bo *bo);
int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr);
+
+extern int cirrus_bpp;
+
#endif /* __CIRRUS_DRV_H__ */