Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755439AbbLAIHw (ORCPT ); Tue, 1 Dec 2015 03:07:52 -0500 Received: from regular1.263xmail.com ([211.150.99.130]:49829 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755300AbbLAIHu (ORCPT ); Tue, 1 Dec 2015 03:07:50 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: treding@nvidia.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <4087d1f0bd14fe2e0edf53e6e293ce10> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <565D5526.7030009@rock-chips.com> Date: Tue, 01 Dec 2015 16:07:02 +0800 From: Mark yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: 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 References: <1448940391-23333-1-git-send-email-mark.yao@rock-chips.com> <1448940953-23604-1-git-send-email-mark.yao@rock-chips.com> <20151201072128.GF17050@phenom.ffwll.local> In-Reply-To: <20151201072128.GF17050@phenom.ffwll.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2777 Lines: 73 On 2015年12月01日 15:21, Daniel Vetter wrote: > 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. Right, another drm driver use dw_hdmi is imx, not yet atomic, this would break it. as you said, I would resend a patch to check DRIVER_ATOMIC at runtime. Thanks -Mark > > 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 -- 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/