Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbbKKPfE (ORCPT ); Wed, 11 Nov 2015 10:35:04 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:52485 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752175AbbKKPe7 (ORCPT ); Wed, 11 Nov 2015 10:34:59 -0500 From: Liviu Dudau To: David Airlie Cc: Russell King , DRI devel , LKML Subject: [PATCH 3/3] drm/i2c: tda998x: Add support for atomic modesetting. Date: Wed, 11 Nov 2015 15:34:35 +0000 Message-Id: <1447256075-471-4-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.6.0 In-Reply-To: <1447256075-471-1-git-send-email-Liviu.Dudau@arm.com> References: <1447256075-471-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1749 Lines: 46 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 Cc: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index a9c8ee8..5c94cea 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -1395,10 +1396,13 @@ static void tda998x_connector_destroy(struct drm_connector *connector) } static const struct drm_connector_funcs tda998x_connector_funcs = { - .dpms = drm_helper_connector_dpms, + .dpms = drm_atomic_helper_connector_dpms, + .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .detect = tda998x_connector_detect, .destroy = tda998x_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; static int tda998x_bind(struct device *dev, struct device *master, void *data) -- 2.6.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/