projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
713456d
)
drm/i2c: tda998x: add some basic mode validation
author
Russell King
<
[email protected]
>
Fri, 7 Feb 2014 19:52:33 +0000
(19:52 +0000)
committer
Russell King
<
[email protected]
>
Thu, 26 Jun 2014 10:03:25 +0000
(11:03 +0100)
The TDA998x can't handle modes with clocks above 150MHz, or resolutions
larger than 8192x2048.
Signed-off-by: Russell King <
[email protected]
>
drivers/gpu/drm/i2c/tda998x_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i2c/tda998x_drv.c
b/drivers/gpu/drm/i2c/tda998x_drv.c
index 3ff7d0713bfb68b646007e4fb677639e15ef5a79..5a738ad0c241605e097c981d6e38d5cd0e6ae726 100644
(file)
--- a/
drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/
drivers/gpu/drm/i2c/tda998x_drv.c
@@
-810,6
+810,12
@@
static int
tda998x_encoder_mode_valid(struct drm_encoder *encoder,
struct drm_display_mode *mode)
{
+ if (mode->clock > 150000)
+ return MODE_CLOCK_HIGH;
+ if (mode->htotal >= BIT(13))
+ return MODE_BAD_HVALUE;
+ if (mode->vtotal >= BIT(11))
+ return MODE_BAD_VVALUE;
return MODE_OK;
}