aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorLiviu Dudau (ARM) <Liviu.Dudau@arm.com>2015-11-23 10:52:42 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-12-03 10:48:19 -0500
commit9736e988d32807d5a186c722928a97f37346fec8 (patch)
tree1f9bc6c01e2efc7de5d6a4d9940a0e46182b50fa /drivers/gpu/drm
parente4618c467d9ea600cc1412b32ad520f22b8b4833 (diff)
drm/i2c: tda998x: Add support for atomic modesetting
When used with a DRIVER_ATOMIC enabled CRTC driver, the tda998x will cause crashes due to missing atomic operations. Fill the drm_connector_funcs struct with the atomic versions of the required functions and add the atomic modeset specific callbacks. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 1ae779581630..0fddb0a2d5b3 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -22,6 +22,7 @@
22#include <sound/asoundef.h> 22#include <sound/asoundef.h>
23 23
24#include <drm/drmP.h> 24#include <drm/drmP.h>
25#include <drm/drm_atomic_helper.h>
25#include <drm/drm_crtc_helper.h> 26#include <drm/drm_crtc_helper.h>
26#include <drm/drm_edid.h> 27#include <drm/drm_edid.h>
27#include <drm/drm_of.h> 28#include <drm/drm_of.h>
@@ -1396,10 +1397,13 @@ static void tda998x_connector_destroy(struct drm_connector *connector)
1396} 1397}
1397 1398
1398static const struct drm_connector_funcs tda998x_connector_funcs = { 1399static const struct drm_connector_funcs tda998x_connector_funcs = {
1399 .dpms = drm_helper_connector_dpms, 1400 .dpms = drm_atomic_helper_connector_dpms,
1401 .reset = drm_atomic_helper_connector_reset,
1400 .fill_modes = drm_helper_probe_single_connector_modes, 1402 .fill_modes = drm_helper_probe_single_connector_modes,
1401 .detect = tda998x_connector_detect, 1403 .detect = tda998x_connector_detect,
1402 .destroy = tda998x_connector_destroy, 1404 .destroy = tda998x_connector_destroy,
1405 .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
1406 .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
1403}; 1407};
1404 1408
1405static int tda998x_bind(struct device *dev, struct device *master, void *data) 1409static int tda998x_bind(struct device *dev, struct device *master, void *data)