Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1372706ybb; Thu, 9 Apr 2020 00:19:07 -0700 (PDT) X-Google-Smtp-Source: APiQypI+Cre0vMNOQgRze4kl3sanksQ/WV1/qopHNXqEjbd+zySAClqaWM6nM2fbFfgTocHtz81J X-Received: by 2002:a4a:9881:: with SMTP id a1mr8934087ooj.75.1586416746380; Thu, 09 Apr 2020 00:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586416746; cv=none; d=google.com; s=arc-20160816; b=Nl9U/E2iqWxag5mqWL22s+m2COCf35POc0KxWC04XwoePdHXPJ+i7MEtkRiQKh9Tiv pR28DDqIzmguQSado1dbismBVNP4L34/jhSPmITOJmnHpXRUzO4KpBBNpUX6bASxTa62 B2Gi2O/pgol+kW4xCOyUv1HoCOyh0+SFwCF2HK/XBxQ5i8TVQmY3OdvArhNIpAJa8iEm FIDOOXTC0ndcrqz2z3BRifb9952SqiFgqoBpIis22BZkr4eEAipdpwmvU8tDkNEkfjld 8/SAIjBxFhPwa2eqJmLIJnmPNffj0JvwtITeZWahtn5iMkml3EgMJrwhXgVzZ32dEAju x/Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=XEywRyOXwpoRuTWlJ5j+LMEado440dnVx99CELnLolo=; b=Ek6bc+MV0NNpLjLWN8j7fKZ21k6pYzY5mHPUQQaLX1SEMFbUzBC5xYIpEnmEjb0FFY 0L79DTrsqbaSE50bCmFlW/l2sorklhsNN2GoeQyP2X4EOY6g+RZlwEQODAz0f5MBJGGK 3Yi97ckVO5Z7wnEF+R/j20GZEuh0Hymsf/gBFPg0iONFtrSo38aF6ds866w1wdxLovfM muDBGwv1vSSE4sq4F99HueLqRfPedzWj29OOKyA2db74QodchpoHpaDgmC/I8ws+Crfq W7BTcwuRqOPJ+7637XS4y+2nCHE2KTO1uIxTlzUHtDQ3/oUD451Dow1Lhcv2Q+npwIjt gDZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=J3TnySVG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si3177640oiy.151.2020.04.09.00.18.51; Thu, 09 Apr 2020 00:19:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=J3TnySVG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbgDIHR4 (ORCPT + 99 others); Thu, 9 Apr 2020 03:17:56 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32783 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgDIHR4 (ORCPT ); Thu, 9 Apr 2020 03:17:56 -0400 Received: by mail-wr1-f66.google.com with SMTP id a25so10693127wrd.0 for ; Thu, 09 Apr 2020 00:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=XEywRyOXwpoRuTWlJ5j+LMEado440dnVx99CELnLolo=; b=J3TnySVG7X0SRfOQujg6yOG3DavP+JDN0lkGk+UlvIFcT6iYa5Q8C65gCTkCAtE2Mo kGmMZx6JLxF4erEc4I6K7rg8br6hzlz0f38KYmgt7Sh0IBzxOCuZ9JUe4h1rgeUm2VwD exythHc/jTstzJ2Fb1HjOoqzOI1cfvOyGgXMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=XEywRyOXwpoRuTWlJ5j+LMEado440dnVx99CELnLolo=; b=R7rZhp+ZnNbcWSe4vuP9X0UONXH4KhYiYqh1UtJ0zzEnwc3q7IVppmLj8hPAp5efKq McmP3F2vsLb00kn1Mq71mOYqefbk4ddtZtzXlJG+P3U70ojZZGhchyTfzyX41/1p3NbA XzbN8hHc6zRyZrNq3u8EiQs6ynIkJ47Off/JsadSCzN0gtGlbQerXCI5WxlZk/797kXc aKh9O5VGMFW6H5xw+y2cP3laZucZVnXFEslUBekySEcuCcZQtRkMUbgVnb5h+9y+kimn HUf3ZmO3ZwJdwWwBrxOB0oWtBrDf1XTFCheRUMzrbdiUgEIa+BGTQvLd8HmbhCgnHUtK istA== X-Gm-Message-State: AGi0Pua4w6Pl2sLtMhilIo9fSPcRz3TxOhOqOQcy83Frp+MfuQOyC7sN f8Tafh7A8DWHHrgKHodNhM/jeDES6uM= X-Received: by 2002:a5d:4081:: with SMTP id o1mr13176684wrp.114.1586416672112; Thu, 09 Apr 2020 00:17:52 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id v7sm2294539wmg.3.2020.04.09.00.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 00:17:51 -0700 (PDT) Date: Thu, 9 Apr 2020 09:17:49 +0200 From: Daniel Vetter To: John Stultz Cc: lkml , Xu YiPing , Rongrong Zou , Xinliang Liu , Xinwei Kong , Chen Feng , David Airlie , Daniel Vetter , Sam Ravnborg , dri-devel Subject: Re: [PATCH] drm: kirin: Revert change to add register connect helper functions Message-ID: <20200409071749.GQ3456981@phenom.ffwll.local> Mail-Followup-To: John Stultz , lkml , Xu YiPing , Rongrong Zou , Xinliang Liu , Xinwei Kong , Chen Feng , David Airlie , Sam Ravnborg , dri-devel References: <20200409004306.18541-1-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200409004306.18541-1-john.stultz@linaro.org> X-Operating-System: Linux phenom 5.3.0-3-amd64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 09, 2020 at 12:43:06AM +0000, John Stultz wrote: > Daniel noted[1] that commit d606dc9a6323 ("drm: kirin: Add > register connect helper functions in drm init") was unnecessary > and incorrect, as drm_dev_register does register connectors for > us. > > Thus, this patch reverts the change as suggested by Daniel. > > [1]: https://lore.kernel.org/lkml/CAKMK7uHr5U-pPsxdQ4MpfK5v8iLjphDFug_3VTiUAf06nhS=yQ@mail.gmail.com/ > > Cc: Xu YiPing > Cc: Rongrong Zou > Cc: Xinliang Liu > Cc: Xinwei Kong > Cc: Chen Feng > Cc: David Airlie > Cc: Daniel Vetter > Cc: Sam Ravnborg > Cc: dri-devel > Signed-off-by: John Stultz Reviewed-by: Daniel Vetter Thanks for the quick fix! Cheers, Daniel > --- > .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - > .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 43 ------------------- > .../gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 1 - > 3 files changed, 45 deletions(-) > > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > index 86000127d4ee..c339e632522a 100644 > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > @@ -940,7 +940,6 @@ static struct drm_driver ade_driver = { > }; > > struct kirin_drm_data ade_driver_data = { > - .register_connects = false, > .num_planes = ADE_CH_NUM, > .prim_plane = ADE_CH1, > .channel_formats = channel_formats, > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c > index d3145ae877d7..4349da3e2379 100644 > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c > @@ -219,40 +219,6 @@ static int kirin_drm_kms_cleanup(struct drm_device *dev) > return 0; > } > > -static int kirin_drm_connectors_register(struct drm_device *dev) > -{ > - struct drm_connector *connector; > - struct drm_connector *failed_connector; > - struct drm_connector_list_iter conn_iter; > - int ret; > - > - mutex_lock(&dev->mode_config.mutex); > - drm_connector_list_iter_begin(dev, &conn_iter); > - drm_for_each_connector_iter(connector, &conn_iter) { > - ret = drm_connector_register(connector); > - if (ret) { > - failed_connector = connector; > - goto err; > - } > - } > - drm_connector_list_iter_end(&conn_iter); > - mutex_unlock(&dev->mode_config.mutex); > - > - return 0; > - > -err: > - drm_connector_list_iter_begin(dev, &conn_iter); > - drm_for_each_connector_iter(connector, &conn_iter) { > - if (failed_connector == connector) > - break; > - drm_connector_unregister(connector); > - } > - drm_connector_list_iter_end(&conn_iter); > - mutex_unlock(&dev->mode_config.mutex); > - > - return ret; > -} > - > static int kirin_drm_bind(struct device *dev) > { > struct kirin_drm_data *driver_data; > @@ -279,17 +245,8 @@ static int kirin_drm_bind(struct device *dev) > > drm_fbdev_generic_setup(drm_dev, 32); > > - /* connectors should be registered after drm device register */ > - if (driver_data->register_connects) { > - ret = kirin_drm_connectors_register(drm_dev); > - if (ret) > - goto err_drm_dev_unregister; > - } > - > return 0; > > -err_drm_dev_unregister: > - drm_dev_unregister(drm_dev); > err_kms_cleanup: > kirin_drm_kms_cleanup(drm_dev); > err_drm_dev_put: > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h > index 4d5c05a24065..dee8ec2f7f2e 100644 > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h > @@ -37,7 +37,6 @@ struct kirin_drm_data { > u32 channel_formats_cnt; > int config_max_width; > int config_max_height; > - bool register_connects; > u32 num_planes; > u32 prim_plane; > > -- > 2.17.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch