From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424040AbcFHJhF (ORCPT ); Wed, 8 Jun 2016 05:37:05 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:41454 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1423784AbcFHJg4 convert rfc822-to-8bit (ORCPT ); Wed, 8 Jun 2016 05:36:56 -0400 From: Vincent ABRIOU To: Boris Brezillon , David Airlie , Daniel Vetter , "dri-devel@lists.freedesktop.org" , Daniel Vetter CC: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Kukjin Kim , Krzysztof Kozlowski , "linux-samsung-soc@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , Jani Nikula , Alexey Brodkin , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Stefan Agner , Alison Wang , Matthias Brugger , Rob Clark , Laurent Pinchart , Mark Yao , Heiko Stuebner , Benjamin Gaignard , Maxime Ripard , Chen-Yu Tsai , Thierry Reding , Stephen Warren , Alexandre Courbot , Eric Anholt , Gerd Hoffmann , "linux-mediatek@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" , "freedreno@lists.freedesktop.org" , "linux-renesas-soc@vger.kernel.org" , "linux-rockchip@lists.infradead.org" , "linux-tegra@vger.kernel.org" , "virtualization@lists.linux-foundation.org" Date: Wed, 8 Jun 2016 11:35:40 +0200 Subject: Re: [PATCH v2 11/20] drm: sti: Rely on the default ->best_encoder() behavior Thread-Topic: [PATCH v2 11/20] drm: sti: Rely on the default ->best_encoder() behavior Thread-Index: AdHBaR+CY841bAqKRIWzemBecCQFMw== Message-ID: <5757E6EC.1050802@st.com> References: <1465300095-16971-1-git-send-email-boris.brezillon@free-electrons.com> <1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com> In-Reply-To: <1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-08_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, Thanks for the patch. Acked-by: Vincent Abriou Vincent On 06/07/2016 01:48 PM, Boris Brezillon wrote: > All outputs have a 1:1 relationship between connectors and encoders > and the driver is relying on the atomic helpers: we can drop the custom > ->best_encoder() implementations and let the core call > drm_atomic_helper_best_encoder() for us. > > Signed-off-by: Boris Brezillon > --- > drivers/gpu/drm/sti/sti_dvo.c | 10 ---------- > drivers/gpu/drm/sti/sti_hda.c | 10 ---------- > drivers/gpu/drm/sti/sti_hdmi.c | 10 ---------- > 3 files changed, 30 deletions(-) > > diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c > index 25f7663..d5627d1 100644 > --- a/drivers/gpu/drm/sti/sti_dvo.c > +++ b/drivers/gpu/drm/sti/sti_dvo.c > @@ -384,20 +384,10 @@ static int sti_dvo_connector_mode_valid(struct drm_connector *connector, > return MODE_OK; > } > > -struct drm_encoder *sti_dvo_best_encoder(struct drm_connector *connector) > -{ > - struct sti_dvo_connector *dvo_connector > - = to_sti_dvo_connector(connector); > - > - /* Best encoder is the one associated during connector creation */ > - return dvo_connector->encoder; > -} > - > static const > struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { > .get_modes = sti_dvo_connector_get_modes, > .mode_valid = sti_dvo_connector_mode_valid, > - .best_encoder = sti_dvo_best_encoder, > }; > > static enum drm_connector_status > diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c > index f7d3464..c4649f5 100644 > --- a/drivers/gpu/drm/sti/sti_hda.c > +++ b/drivers/gpu/drm/sti/sti_hda.c > @@ -676,20 +676,10 @@ static int sti_hda_connector_mode_valid(struct drm_connector *connector, > return MODE_OK; > } > > -struct drm_encoder *sti_hda_best_encoder(struct drm_connector *connector) > -{ > - struct sti_hda_connector *hda_connector > - = to_sti_hda_connector(connector); > - > - /* Best encoder is the one associated during connector creation */ > - return hda_connector->encoder; > -} > - > static const > struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { > .get_modes = sti_hda_connector_get_modes, > .mode_valid = sti_hda_connector_mode_valid, > - .best_encoder = sti_hda_best_encoder, > }; > > static enum drm_connector_status > diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c > index 6ef0715..dc9ab6e 100644 > --- a/drivers/gpu/drm/sti/sti_hdmi.c > +++ b/drivers/gpu/drm/sti/sti_hdmi.c > @@ -897,20 +897,10 @@ static int sti_hdmi_connector_mode_valid(struct drm_connector *connector, > return MODE_OK; > } > > -struct drm_encoder *sti_hdmi_best_encoder(struct drm_connector *connector) > -{ > - struct sti_hdmi_connector *hdmi_connector > - = to_sti_hdmi_connector(connector); > - > - /* Best encoder is the one associated during connector creation */ > - return hdmi_connector->encoder; > -} > - > static const > struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { > .get_modes = sti_hdmi_connector_get_modes, > .mode_valid = sti_hdmi_connector_mode_valid, > - .best_encoder = sti_hdmi_best_encoder, > }; > > /* get detection status of display device */ >