From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755379AbbLAHVf (ORCPT ); Tue, 1 Dec 2015 02:21:35 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:33035 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755257AbbLAHVc (ORCPT ); Tue, 1 Dec 2015 02:21:32 -0500 Date: Tue, 1 Dec 2015 08:21:28 +0100 From: Daniel Vetter To: Mark Yao Cc: David Airlie , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Philipp Zabel , Andy Yan , Fabio Estevam , Thierry Reding Subject: Re: [RFC PATCH 8/9] drm: bridge/dw_hdmi: Covert to support atomic API Message-ID: <20151201072128.GF17050@phenom.ffwll.local> Mail-Followup-To: Mark Yao , David Airlie , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Philipp Zabel , Andy Yan , Fabio Estevam , Thierry Reding References: <1448940391-23333-1-git-send-email-mark.yao@rock-chips.com> <1448940953-23604-1-git-send-email-mark.yao@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448940953-23604-1-git-send-email-mark.yao@rock-chips.com> X-Operating-System: Linux phenom 4.1.0-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 01, 2015 at 11:35:53AM +0800, Mark Yao wrote: > Fill atomic needed funcs with default atomic helper library. > > Rockchip use dw_hdmi, and drm/rockchip will covert to atomic api, > we need dw_hdmi support atomic funcs. > > Signed-off-by: Mark Yao Aren't there drivers around which use dw_hdmi and which are still not yet atomic? This would break them. I think we neeed two connector_func tables and dw_hdmi needs to check for DRIVER_ATOMIC at runtime and pick the right version. The larger problem here is that "who should register the drm_connector" is a bit an unsolved problem, since both the bridge and the driver should be able to customize/adjust the drm_connector at the end of a bridge chain. This here is just another example of this problem. -Daniel > --- > drivers/gpu/drm/bridge/dw_hdmi.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c > index 56de9f1..587065a 100644 > --- a/drivers/gpu/drm/bridge/dw_hdmi.c > +++ b/drivers/gpu/drm/bridge/dw_hdmi.c > @@ -22,6 +22,7 @@ > > #include > #include > +#include > #include > #include > #include > @@ -1515,11 +1516,14 @@ static void dw_hdmi_connector_force(struct drm_connector *connector) > } > > static struct drm_connector_funcs dw_hdmi_connector_funcs = { > - .dpms = drm_helper_connector_dpms, > + .dpms = drm_atomic_helper_connector_dpms, > .fill_modes = drm_helper_probe_single_connector_modes, > .detect = dw_hdmi_connector_detect, > .destroy = dw_hdmi_connector_destroy, > .force = dw_hdmi_connector_force, > + .reset = drm_atomic_helper_connector_reset, > + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, > + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, > }; > > static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { > -- > 1.7.9.5 > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch