Message ID | 20231010123345.12bfda28@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2218809vqo; Mon, 9 Oct 2023 18:34:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTHLVeqnM9xGODp0l6bNUYpKQJkYfcLePNLHTbTHHtaK/peC7BJkbNQEOL/Jd7+kHvNhX+ X-Received: by 2002:a05:6358:290f:b0:143:9b23:e850 with SMTP id y15-20020a056358290f00b001439b23e850mr20505484rwb.24.1696901659690; Mon, 09 Oct 2023 18:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696901659; cv=none; d=google.com; s=arc-20160816; b=o9BUW0w8NVFINcvrg5xwsfSxO/wlgosy46SPlFLgdgguYIxa+cl9Dw5Fi2Swlepm4e PX1Xl5z8d/oCESUq6Fj0FJpwEiRyIIniDZYP7O7qMx06IXIyYwWWmQpR8lcStf4KOYwe Cd8nNX1wsccs6izgeY1APLvRo7OKg5QT8qCyjBEbQPuGneGFcwrfWGqqSr/iWVbjL5MO dp7ocquozumypV1IxnzpRnaivjaj+a2zzGbobdBSKO3A+eZCm2CVNDHZRuZYEq4agHq+ 52tSs64BMTW9Px9FDsYlFS1HJPy9Amk7lHaquyCHmhftpYz/UUwD3YhrmHdECSWBlLJM u2Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=mZxda45LSjxRlWdtqkpi6JYNGMZ5G2NJZ3ktd0qA/V4=; fh=RTkVnoiDkuR9+lvRc9Ku6PTt0997v00a+udXPLFEZbo=; b=L9hwTitbWjqF9vS81Zp6XhPhPLDghbydawM7RHguEjwA+YAKZQs0zpW35RqTL7c9sp ljuGDbeBwD6jgmy17BnBHVe1nYeBgvabK5y1YkKvoB9HDAwsmLBIbNEDddMptFmAyU18 MHeD2hI4Kh+uOot3cJycKmVparmDfeatSGVpbucCwth2nbuapOZyYz0fP9IUFGMVjNzn H5BgmDJl4sQqpRnUuncq1KW/GEceJ9CgtcHnQucVs7f9OqgoAyfGpoIPBt279dE6iXNu MRcWFAfgQWnrWFLEifZH4DjiIfXS3+Q22oKgkQQioKo6brG0C2bTwV3odduFqsUdUddm OdmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=E0TLdRRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id ob4-20020a17090b390400b00274d6373fe1si14152914pjb.120.2023.10.09.18.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 18:34:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=E0TLdRRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 22DC18029116; Mon, 9 Oct 2023 18:34:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379347AbjJJBeB (ORCPT <rfc822;kartikey406@gmail.com> + 19 others); Mon, 9 Oct 2023 21:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379299AbjJJBdx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Oct 2023 21:33:53 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 715D09E; Mon, 9 Oct 2023 18:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1696901628; bh=mZxda45LSjxRlWdtqkpi6JYNGMZ5G2NJZ3ktd0qA/V4=; h=Date:From:To:Cc:Subject:From; b=E0TLdRRAPRiKWzXfCCSp+m93yqyS+Q5LMghXvLWiV6YYmGFpPCDx6B3+Pt+yYU6TI ZJd5/Q/NQFdxdo6ti+a5Ibd+PWWr8TbdDWgi+uZbprOLG6pNv5zzqBC/8MPzoBtw8U 3FZCfnhGVkZMK8s5igoHtSiUIyb3NOJEYKtM3+239saqTRDQxdSpgkI19xFw4vNGXs ULTHTy4QKpNWBMPljaXEi0foUG17siqFXMKv9sGzVkzo4lcPUPU+ZSyNPeJAycChUF DDIQQgcowNSNmm3iDLO35FCaBoSKj2ux7qMjdAmMMQiCa7hJX4v8imYlI1ty0fFKh+ inLmp/zTmPL9A== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4S4JMZ2ST8z4xSn; Tue, 10 Oct 2023 12:33:46 +1100 (AEDT) Date: Tue, 10 Oct 2023 12:33:45 +1100 From: Stephen Rothwell <sfr@canb.auug.org.au> To: Rob Clark <robdclark@gmail.com>, Sean Paul <seanpaul@chromium.org>, Andrew Morton <akpm@linux-foundation.org>, Dave Airlie <airlied@redhat.com> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Javier Martinez Canillas <javierm@redhat.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org>, Qi Zheng <zhengqi.arch@bytedance.com>, Rob Clark <robdclark@chromium.org>, Uwe =?utf-8?q?Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, DRI <dri-devel@lists.freedesktop.org> Subject: linux-next: manual merge of the drm-msm tree with the mm, drm trees Message-ID: <20231010123345.12bfda28@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/rWDVrW2M2hR+XA_N0lP.=mV"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 18:34:17 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779330354611031018 X-GMAIL-MSGID: 1779330354611031018 |
Series |
linux-next: manual merge of the drm-msm tree with the mm, drm trees
|
|
Commit Message
Stephen Rothwell
Oct. 10, 2023, 1:33 a.m. UTC
Hi all, FIXME: Add owner of second tree to To: Add author(s)/SOB of conflicting commits. Today's linux-next merge of the drm-msm tree got conflicts in: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c drivers/gpu/drm/msm/msm_drv.c between commits: 01790d5e372f ("drm/msm: Convert to platform remove callback returning void") cd61a76c210a ("drm/msm: dynamically allocate the drm-msm_gem shrinker") from the mm, drm trees and commits: 283add3e6405 ("drm/msm: remove shutdown callback from msm_platform_driver") 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") from the drm-msm tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Comments
Hello Stephen, On Tue, Oct 10, 2023 at 12:33:45PM +1100, Stephen Rothwell wrote: > Today's linux-next merge of the drm-msm tree got conflicts in: > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > drivers/gpu/drm/msm/msm_drv.c > > between commits: > > 01790d5e372f ("drm/msm: Convert to platform remove callback returning void") > cd61a76c210a ("drm/msm: dynamically allocate the drm-msm_gem shrinker") > > from the mm, drm trees and commits: > > 283add3e6405 ("drm/msm: remove shutdown callback from msm_platform_driver") > 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") > > from the drm-msm tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. FTR: The conflict resolution looks right to me. Thanks! Best regards Uwe
Hey Dave, lmk how you want me to handle this to make it easier for you when I send my pull request for 6.7.. I can merge drm-next to take care of *that* conflict (either before I send my PR or push it somewhere where you can see the resolution) but not sure about the mm conflict since pulling that might get me ahead of drm-next. Either way, Stephen's resolution looks correct. BR, -R On Mon, Oct 9, 2023 at 6:33 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Hi all, > > FIXME: Add owner of second tree to To: > Add author(s)/SOB of conflicting commits. > > Today's linux-next merge of the drm-msm tree got conflicts in: > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > drivers/gpu/drm/msm/msm_drv.c > > between commits: > > 01790d5e372f ("drm/msm: Convert to platform remove callback returning void") > cd61a76c210a ("drm/msm: dynamically allocate the drm-msm_gem shrinker") > > from the mm, drm trees and commits: > > 283add3e6405 ("drm/msm: remove shutdown callback from msm_platform_driver") > 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") > > from the drm-msm tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > index 82381d12414d,d14ae316796c..000000000000 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > @@@ -1299,12 -1230,72 +1230,70 @@@ static int dpu_kms_init(struct drm_devi > > static int dpu_dev_probe(struct platform_device *pdev) > { > - return msm_drv_probe(&pdev->dev, dpu_kms_init); > + struct device *dev = &pdev->dev; > + struct dpu_kms *dpu_kms; > + int irq; > + int ret = 0; > + > + dpu_kms = devm_kzalloc(dev, sizeof(*dpu_kms), GFP_KERNEL); > + if (!dpu_kms) > + return -ENOMEM; > + > + dpu_kms->pdev = pdev; > + > + ret = devm_pm_opp_set_clkname(dev, "core"); > + if (ret) > + return ret; > + /* OPP table is optional */ > + ret = devm_pm_opp_of_add_table(dev); > + if (ret && ret != -ENODEV) > + return dev_err_probe(dev, ret, "invalid OPP table in device tree\n"); > + > + ret = devm_clk_bulk_get_all(&pdev->dev, &dpu_kms->clocks); > + if (ret < 0) > + return dev_err_probe(dev, ret, "failed to parse clocks\n"); > + > + dpu_kms->num_clocks = ret; > + > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) > + return dev_err_probe(dev, irq, "failed to get irq\n"); > + > + dpu_kms->base.irq = irq; > + > + dpu_kms->mmio = msm_ioremap(pdev, "mdp"); > + if (IS_ERR(dpu_kms->mmio)) { > + ret = PTR_ERR(dpu_kms->mmio); > + DPU_ERROR("mdp register memory map failed: %d\n", ret); > + dpu_kms->mmio = NULL; > + return ret; > + } > + DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio); > + > + dpu_kms->vbif[VBIF_RT] = msm_ioremap(pdev, "vbif"); > + if (IS_ERR(dpu_kms->vbif[VBIF_RT])) { > + ret = PTR_ERR(dpu_kms->vbif[VBIF_RT]); > + DPU_ERROR("vbif register memory map failed: %d\n", ret); > + dpu_kms->vbif[VBIF_RT] = NULL; > + return ret; > + } > + > + dpu_kms->vbif[VBIF_NRT] = msm_ioremap_quiet(pdev, "vbif_nrt"); > + if (IS_ERR(dpu_kms->vbif[VBIF_NRT])) { > + dpu_kms->vbif[VBIF_NRT] = NULL; > + DPU_DEBUG("VBIF NRT is not defined"); > + } > + > + ret = dpu_kms_parse_data_bus_icc_path(dpu_kms); > + if (ret) > + return ret; > + > + return msm_drv_probe(&pdev->dev, dpu_kms_init, &dpu_kms->base); > } > > -static int dpu_dev_remove(struct platform_device *pdev) > +static void dpu_dev_remove(struct platform_device *pdev) > { > component_master_del(&pdev->dev, &msm_drm_ops); > - > - return 0; > } > > static int __maybe_unused dpu_runtime_suspend(struct device *dev) > @@@ -1380,8 -1371,8 +1369,8 @@@ MODULE_DEVICE_TABLE(of, dpu_dt_match) > > static struct platform_driver dpu_driver = { > .probe = dpu_dev_probe, > - .remove = dpu_dev_remove, > + .remove_new = dpu_dev_remove, > - .shutdown = msm_drv_shutdown, > + .shutdown = msm_kms_shutdown, > .driver = { > .name = "msm_dpu", > .of_match_table = dpu_dt_match, > diff --cc drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > index e5012fa6771f,982b7689e5b6..000000000000 > --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > @@@ -557,12 -507,60 +507,58 @@@ static const struct dev_pm_ops mdp4_pm_ > > static int mdp4_probe(struct platform_device *pdev) > { > - return msm_drv_probe(&pdev->dev, mdp4_kms_init); > + struct device *dev = &pdev->dev; > + struct mdp4_kms *mdp4_kms; > + int irq; > + > + mdp4_kms = devm_kzalloc(dev, sizeof(*mdp4_kms), GFP_KERNEL); > + if (!mdp4_kms) > + return dev_err_probe(dev, -ENOMEM, "failed to allocate kms\n"); > + > + mdp4_kms->mmio = msm_ioremap(pdev, NULL); > + if (IS_ERR(mdp4_kms->mmio)) > + return PTR_ERR(mdp4_kms->mmio); > + > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) > + return dev_err_probe(dev, irq, "failed to get irq\n"); > + > + mdp4_kms->base.base.irq = irq; > + > + /* NOTE: driver for this regulator still missing upstream.. use > + * _get_exclusive() and ignore the error if it does not exist > + * (and hope that the bootloader left it on for us) > + */ > + mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); > + if (IS_ERR(mdp4_kms->vdd)) > + mdp4_kms->vdd = NULL; > + > + mdp4_kms->clk = devm_clk_get(&pdev->dev, "core_clk"); > + if (IS_ERR(mdp4_kms->clk)) > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->clk), "failed to get core_clk\n"); > + > + mdp4_kms->pclk = devm_clk_get(&pdev->dev, "iface_clk"); > + if (IS_ERR(mdp4_kms->pclk)) > + mdp4_kms->pclk = NULL; > + > + mdp4_kms->axi_clk = devm_clk_get(&pdev->dev, "bus_clk"); > + if (IS_ERR(mdp4_kms->axi_clk)) > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->axi_clk), "failed to get axi_clk\n"); > + > + /* > + * This is required for revn >= 2. Handle errors here and let the kms > + * init bail out if the clock is not provided. > + */ > + mdp4_kms->lut_clk = devm_clk_get_optional(&pdev->dev, "lut_clk"); > + if (IS_ERR(mdp4_kms->lut_clk)) > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->lut_clk), "failed to get lut_clk\n"); > + > + return msm_drv_probe(&pdev->dev, mdp4_kms_init, &mdp4_kms->base.base); > } > > -static int mdp4_remove(struct platform_device *pdev) > +static void mdp4_remove(struct platform_device *pdev) > { > component_master_del(&pdev->dev, &msm_drm_ops); > - > - return 0; > } > > static const struct of_device_id mdp4_dt_match[] = { > @@@ -573,8 -571,8 +569,8 @@@ MODULE_DEVICE_TABLE(of, mdp4_dt_match) > > static struct platform_driver mdp4_platform_driver = { > .probe = mdp4_probe, > - .remove = mdp4_remove, > + .remove_new = mdp4_remove, > - .shutdown = msm_drv_shutdown, > + .shutdown = msm_kms_shutdown, > .driver = { > .name = "mdp4", > .of_match_table = mdp4_dt_match, > diff --cc drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > index 8a7b44376bc6,a28fbcd09684..000000000000 > --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > @@@ -939,10 -894,43 +894,43 @@@ static int mdp5_dev_probe(struct platfo > if (ret) > return ret; > > - return msm_drv_probe(&pdev->dev, mdp5_kms_init); > + mdp5_kms->pdev = pdev; > + > + spin_lock_init(&mdp5_kms->resource_lock); > + > + mdp5_kms->mmio = msm_ioremap(pdev, "mdp_phys"); > + if (IS_ERR(mdp5_kms->mmio)) > + return PTR_ERR(mdp5_kms->mmio); > + > + /* mandatory clocks: */ > + ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus", true); > + if (ret) > + return ret; > + ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface", true); > + if (ret) > + return ret; > + ret = get_clk(pdev, &mdp5_kms->core_clk, "core", true); > + if (ret) > + return ret; > + ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync", true); > + if (ret) > + return ret; > + > + /* optional clocks: */ > + get_clk(pdev, &mdp5_kms->lut_clk, "lut", false); > + get_clk(pdev, &mdp5_kms->tbu_clk, "tbu", false); > + get_clk(pdev, &mdp5_kms->tbu_rt_clk, "tbu_rt", false); > + > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) > + return dev_err_probe(&pdev->dev, irq, "failed to get irq\n"); > + > + mdp5_kms->base.base.irq = irq; > + > + return msm_drv_probe(&pdev->dev, mdp5_kms_init, &mdp5_kms->base.base); > } > > -static int mdp5_dev_remove(struct platform_device *pdev) > +static void mdp5_dev_remove(struct platform_device *pdev) > { > DBG(""); > component_master_del(&pdev->dev, &msm_drm_ops); > @@@ -986,8 -975,8 +974,8 @@@ MODULE_DEVICE_TABLE(of, mdp5_dt_match) > > static struct platform_driver mdp5_driver = { > .probe = mdp5_dev_probe, > - .remove = mdp5_dev_remove, > + .remove_new = mdp5_dev_remove, > - .shutdown = msm_drv_shutdown, > + .shutdown = msm_kms_shutdown, > .driver = { > .name = "msm_mdp", > .of_match_table = mdp5_dt_match, > diff --cc drivers/gpu/drm/msm/msm_drv.c > index 05fe32c3a4b4,401e9ef86074..000000000000 > --- a/drivers/gpu/drm/msm/msm_drv.c > +++ b/drivers/gpu/drm/msm/msm_drv.c > @@@ -457,23 -264,12 +264,14 @@@ static int msm_drm_init(struct device * > if (ret) > goto err_deinit_vram; > > - /* the fw fb could be anywhere in memory */ > - ret = drm_aperture_remove_framebuffers(drv); > - if (ret) > - goto err_msm_uninit; > - > - msm_gem_shrinker_init(ddev); > + ret = msm_gem_shrinker_init(ddev); > + if (ret) > + goto err_msm_uninit; > > if (priv->kms_init) { > - ret = priv->kms_init(ddev); > - if (ret) { > - DRM_DEV_ERROR(dev, "failed to load kms\n"); > - priv->kms = NULL; > + ret = msm_drm_kms_init(dev, drv); > + if (ret) > goto err_msm_uninit; > - } > - kms = priv->kms; > } else { > /* valid only for the dummy headless case, where of_node=NULL */ > WARN_ON(dev->of_node); > @@@ -1277,37 -971,21 +973,19 @@@ int msm_drv_probe(struct device *master > > static int msm_pdev_probe(struct platform_device *pdev) > { > - return msm_drv_probe(&pdev->dev, NULL); > + return msm_drv_probe(&pdev->dev, NULL, NULL); > } > > -static int msm_pdev_remove(struct platform_device *pdev) > +static void msm_pdev_remove(struct platform_device *pdev) > { > component_master_del(&pdev->dev, &msm_drm_ops); > - > - return 0; > } > > - void msm_drv_shutdown(struct platform_device *pdev) > - { > - struct msm_drm_private *priv = platform_get_drvdata(pdev); > - struct drm_device *drm = priv ? priv->dev : NULL; > - > - /* > - * Shutdown the hw if we're far enough along where things might be on. > - * If we run this too early, we'll end up panicking in any variety of > - * places. Since we don't register the drm device until late in > - * msm_drm_init, drm_dev->registered is used as an indicator that the > - * shutdown will be successful. > - */ > - if (drm && drm->registered && priv->kms) > - drm_atomic_helper_shutdown(drm); > - } > - > static struct platform_driver msm_platform_driver = { > .probe = msm_pdev_probe, > - .remove = msm_pdev_remove, > + .remove_new = msm_pdev_remove, > - .shutdown = msm_drv_shutdown, > .driver = { > .name = "msm", > - .pm = &msm_pm_ops, > }, > }; >
On Wed, 11 Oct 2023 at 05:38, Rob Clark <robdclark@chromium.org> wrote: > > Hey Dave, > > lmk how you want me to handle this to make it easier for you when I > send my pull request for 6.7.. I can merge drm-next to take care of > *that* conflict (either before I send my PR or push it somewhere where > you can see the resolution) but not sure about the mm conflict since > pulling that might get me ahead of drm-next. Either way, Stephen's > resolution looks correct. The -mm one will get resolved in the merge window by Linus (unless Andrew wants to do a topic branch, but I don't think that's needed). The drm one I think we can sort out on the next drm-msm-next pull or so. -Sima > > BR, > -R > > On Mon, Oct 9, 2023 at 6:33 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > Hi all, > > > > FIXME: Add owner of second tree to To: > > Add author(s)/SOB of conflicting commits. > > > > Today's linux-next merge of the drm-msm tree got conflicts in: > > > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > > drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > > drivers/gpu/drm/msm/msm_drv.c > > > > between commits: > > > > 01790d5e372f ("drm/msm: Convert to platform remove callback returning void") > > cd61a76c210a ("drm/msm: dynamically allocate the drm-msm_gem shrinker") > > > > from the mm, drm trees and commits: > > > > 283add3e6405 ("drm/msm: remove shutdown callback from msm_platform_driver") > > 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") > > > > from the drm-msm tree. > > > > I fixed it up (see below) and can carry the fix as necessary. This > > is now fixed as far as linux-next is concerned, but any non trivial > > conflicts should be mentioned to your upstream maintainer when your tree > > is submitted for merging. You may also want to consider cooperating > > with the maintainer of the conflicting tree to minimise any particularly > > complex conflicts. > > > > -- > > Cheers, > > Stephen Rothwell > > > > diff --cc drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > > index 82381d12414d,d14ae316796c..000000000000 > > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > > @@@ -1299,12 -1230,72 +1230,70 @@@ static int dpu_kms_init(struct drm_devi > > > > static int dpu_dev_probe(struct platform_device *pdev) > > { > > - return msm_drv_probe(&pdev->dev, dpu_kms_init); > > + struct device *dev = &pdev->dev; > > + struct dpu_kms *dpu_kms; > > + int irq; > > + int ret = 0; > > + > > + dpu_kms = devm_kzalloc(dev, sizeof(*dpu_kms), GFP_KERNEL); > > + if (!dpu_kms) > > + return -ENOMEM; > > + > > + dpu_kms->pdev = pdev; > > + > > + ret = devm_pm_opp_set_clkname(dev, "core"); > > + if (ret) > > + return ret; > > + /* OPP table is optional */ > > + ret = devm_pm_opp_of_add_table(dev); > > + if (ret && ret != -ENODEV) > > + return dev_err_probe(dev, ret, "invalid OPP table in device tree\n"); > > + > > + ret = devm_clk_bulk_get_all(&pdev->dev, &dpu_kms->clocks); > > + if (ret < 0) > > + return dev_err_probe(dev, ret, "failed to parse clocks\n"); > > + > > + dpu_kms->num_clocks = ret; > > + > > + irq = platform_get_irq(pdev, 0); > > + if (irq < 0) > > + return dev_err_probe(dev, irq, "failed to get irq\n"); > > + > > + dpu_kms->base.irq = irq; > > + > > + dpu_kms->mmio = msm_ioremap(pdev, "mdp"); > > + if (IS_ERR(dpu_kms->mmio)) { > > + ret = PTR_ERR(dpu_kms->mmio); > > + DPU_ERROR("mdp register memory map failed: %d\n", ret); > > + dpu_kms->mmio = NULL; > > + return ret; > > + } > > + DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio); > > + > > + dpu_kms->vbif[VBIF_RT] = msm_ioremap(pdev, "vbif"); > > + if (IS_ERR(dpu_kms->vbif[VBIF_RT])) { > > + ret = PTR_ERR(dpu_kms->vbif[VBIF_RT]); > > + DPU_ERROR("vbif register memory map failed: %d\n", ret); > > + dpu_kms->vbif[VBIF_RT] = NULL; > > + return ret; > > + } > > + > > + dpu_kms->vbif[VBIF_NRT] = msm_ioremap_quiet(pdev, "vbif_nrt"); > > + if (IS_ERR(dpu_kms->vbif[VBIF_NRT])) { > > + dpu_kms->vbif[VBIF_NRT] = NULL; > > + DPU_DEBUG("VBIF NRT is not defined"); > > + } > > + > > + ret = dpu_kms_parse_data_bus_icc_path(dpu_kms); > > + if (ret) > > + return ret; > > + > > + return msm_drv_probe(&pdev->dev, dpu_kms_init, &dpu_kms->base); > > } > > > > -static int dpu_dev_remove(struct platform_device *pdev) > > +static void dpu_dev_remove(struct platform_device *pdev) > > { > > component_master_del(&pdev->dev, &msm_drm_ops); > > - > > - return 0; > > } > > > > static int __maybe_unused dpu_runtime_suspend(struct device *dev) > > @@@ -1380,8 -1371,8 +1369,8 @@@ MODULE_DEVICE_TABLE(of, dpu_dt_match) > > > > static struct platform_driver dpu_driver = { > > .probe = dpu_dev_probe, > > - .remove = dpu_dev_remove, > > + .remove_new = dpu_dev_remove, > > - .shutdown = msm_drv_shutdown, > > + .shutdown = msm_kms_shutdown, > > .driver = { > > .name = "msm_dpu", > > .of_match_table = dpu_dt_match, > > diff --cc drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > > index e5012fa6771f,982b7689e5b6..000000000000 > > --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > > +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c > > @@@ -557,12 -507,60 +507,58 @@@ static const struct dev_pm_ops mdp4_pm_ > > > > static int mdp4_probe(struct platform_device *pdev) > > { > > - return msm_drv_probe(&pdev->dev, mdp4_kms_init); > > + struct device *dev = &pdev->dev; > > + struct mdp4_kms *mdp4_kms; > > + int irq; > > + > > + mdp4_kms = devm_kzalloc(dev, sizeof(*mdp4_kms), GFP_KERNEL); > > + if (!mdp4_kms) > > + return dev_err_probe(dev, -ENOMEM, "failed to allocate kms\n"); > > + > > + mdp4_kms->mmio = msm_ioremap(pdev, NULL); > > + if (IS_ERR(mdp4_kms->mmio)) > > + return PTR_ERR(mdp4_kms->mmio); > > + > > + irq = platform_get_irq(pdev, 0); > > + if (irq < 0) > > + return dev_err_probe(dev, irq, "failed to get irq\n"); > > + > > + mdp4_kms->base.base.irq = irq; > > + > > + /* NOTE: driver for this regulator still missing upstream.. use > > + * _get_exclusive() and ignore the error if it does not exist > > + * (and hope that the bootloader left it on for us) > > + */ > > + mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); > > + if (IS_ERR(mdp4_kms->vdd)) > > + mdp4_kms->vdd = NULL; > > + > > + mdp4_kms->clk = devm_clk_get(&pdev->dev, "core_clk"); > > + if (IS_ERR(mdp4_kms->clk)) > > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->clk), "failed to get core_clk\n"); > > + > > + mdp4_kms->pclk = devm_clk_get(&pdev->dev, "iface_clk"); > > + if (IS_ERR(mdp4_kms->pclk)) > > + mdp4_kms->pclk = NULL; > > + > > + mdp4_kms->axi_clk = devm_clk_get(&pdev->dev, "bus_clk"); > > + if (IS_ERR(mdp4_kms->axi_clk)) > > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->axi_clk), "failed to get axi_clk\n"); > > + > > + /* > > + * This is required for revn >= 2. Handle errors here and let the kms > > + * init bail out if the clock is not provided. > > + */ > > + mdp4_kms->lut_clk = devm_clk_get_optional(&pdev->dev, "lut_clk"); > > + if (IS_ERR(mdp4_kms->lut_clk)) > > + return dev_err_probe(dev, PTR_ERR(mdp4_kms->lut_clk), "failed to get lut_clk\n"); > > + > > + return msm_drv_probe(&pdev->dev, mdp4_kms_init, &mdp4_kms->base.base); > > } > > > > -static int mdp4_remove(struct platform_device *pdev) > > +static void mdp4_remove(struct platform_device *pdev) > > { > > component_master_del(&pdev->dev, &msm_drm_ops); > > - > > - return 0; > > } > > > > static const struct of_device_id mdp4_dt_match[] = { > > @@@ -573,8 -571,8 +569,8 @@@ MODULE_DEVICE_TABLE(of, mdp4_dt_match) > > > > static struct platform_driver mdp4_platform_driver = { > > .probe = mdp4_probe, > > - .remove = mdp4_remove, > > + .remove_new = mdp4_remove, > > - .shutdown = msm_drv_shutdown, > > + .shutdown = msm_kms_shutdown, > > .driver = { > > .name = "mdp4", > > .of_match_table = mdp4_dt_match, > > diff --cc drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > > index 8a7b44376bc6,a28fbcd09684..000000000000 > > --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > > +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > > @@@ -939,10 -894,43 +894,43 @@@ static int mdp5_dev_probe(struct platfo > > if (ret) > > return ret; > > > > - return msm_drv_probe(&pdev->dev, mdp5_kms_init); > > + mdp5_kms->pdev = pdev; > > + > > + spin_lock_init(&mdp5_kms->resource_lock); > > + > > + mdp5_kms->mmio = msm_ioremap(pdev, "mdp_phys"); > > + if (IS_ERR(mdp5_kms->mmio)) > > + return PTR_ERR(mdp5_kms->mmio); > > + > > + /* mandatory clocks: */ > > + ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus", true); > > + if (ret) > > + return ret; > > + ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface", true); > > + if (ret) > > + return ret; > > + ret = get_clk(pdev, &mdp5_kms->core_clk, "core", true); > > + if (ret) > > + return ret; > > + ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync", true); > > + if (ret) > > + return ret; > > + > > + /* optional clocks: */ > > + get_clk(pdev, &mdp5_kms->lut_clk, "lut", false); > > + get_clk(pdev, &mdp5_kms->tbu_clk, "tbu", false); > > + get_clk(pdev, &mdp5_kms->tbu_rt_clk, "tbu_rt", false); > > + > > + irq = platform_get_irq(pdev, 0); > > + if (irq < 0) > > + return dev_err_probe(&pdev->dev, irq, "failed to get irq\n"); > > + > > + mdp5_kms->base.base.irq = irq; > > + > > + return msm_drv_probe(&pdev->dev, mdp5_kms_init, &mdp5_kms->base.base); > > } > > > > -static int mdp5_dev_remove(struct platform_device *pdev) > > +static void mdp5_dev_remove(struct platform_device *pdev) > > { > > DBG(""); > > component_master_del(&pdev->dev, &msm_drm_ops); > > @@@ -986,8 -975,8 +974,8 @@@ MODULE_DEVICE_TABLE(of, mdp5_dt_match) > > > > static struct platform_driver mdp5_driver = { > > .probe = mdp5_dev_probe, > > - .remove = mdp5_dev_remove, > > + .remove_new = mdp5_dev_remove, > > - .shutdown = msm_drv_shutdown, > > + .shutdown = msm_kms_shutdown, > > .driver = { > > .name = "msm_mdp", > > .of_match_table = mdp5_dt_match, > > diff --cc drivers/gpu/drm/msm/msm_drv.c > > index 05fe32c3a4b4,401e9ef86074..000000000000 > > --- a/drivers/gpu/drm/msm/msm_drv.c > > +++ b/drivers/gpu/drm/msm/msm_drv.c > > @@@ -457,23 -264,12 +264,14 @@@ static int msm_drm_init(struct device * > > if (ret) > > goto err_deinit_vram; > > > > - /* the fw fb could be anywhere in memory */ > > - ret = drm_aperture_remove_framebuffers(drv); > > - if (ret) > > - goto err_msm_uninit; > > - > > - msm_gem_shrinker_init(ddev); > > + ret = msm_gem_shrinker_init(ddev); > > + if (ret) > > + goto err_msm_uninit; > > > > if (priv->kms_init) { > > - ret = priv->kms_init(ddev); > > - if (ret) { > > - DRM_DEV_ERROR(dev, "failed to load kms\n"); > > - priv->kms = NULL; > > + ret = msm_drm_kms_init(dev, drv); > > + if (ret) > > goto err_msm_uninit; > > - } > > - kms = priv->kms; > > } else { > > /* valid only for the dummy headless case, where of_node=NULL */ > > WARN_ON(dev->of_node); > > @@@ -1277,37 -971,21 +973,19 @@@ int msm_drv_probe(struct device *master > > > > static int msm_pdev_probe(struct platform_device *pdev) > > { > > - return msm_drv_probe(&pdev->dev, NULL); > > + return msm_drv_probe(&pdev->dev, NULL, NULL); > > } > > > > -static int msm_pdev_remove(struct platform_device *pdev) > > +static void msm_pdev_remove(struct platform_device *pdev) > > { > > component_master_del(&pdev->dev, &msm_drm_ops); > > - > > - return 0; > > } > > > > - void msm_drv_shutdown(struct platform_device *pdev) > > - { > > - struct msm_drm_private *priv = platform_get_drvdata(pdev); > > - struct drm_device *drm = priv ? priv->dev : NULL; > > - > > - /* > > - * Shutdown the hw if we're far enough along where things might be on. > > - * If we run this too early, we'll end up panicking in any variety of > > - * places. Since we don't register the drm device until late in > > - * msm_drm_init, drm_dev->registered is used as an indicator that the > > - * shutdown will be successful. > > - */ > > - if (drm && drm->registered && priv->kms) > > - drm_atomic_helper_shutdown(drm); > > - } > > - > > static struct platform_driver msm_platform_driver = { > > .probe = msm_pdev_probe, > > - .remove = msm_pdev_remove, > > + .remove_new = msm_pdev_remove, > > - .shutdown = msm_drv_shutdown, > > .driver = { > > .name = "msm", > > - .pm = &msm_pm_ops, > > }, > > }; > >
diff --cc drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 82381d12414d,d14ae316796c..000000000000 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c diff --cc drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c index e5012fa6771f,982b7689e5b6..000000000000 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c diff --cc drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 8a7b44376bc6,a28fbcd09684..000000000000 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c diff --cc drivers/gpu/drm/msm/msm_drv.c index 05fe32c3a4b4,401e9ef86074..000000000000 --- a/drivers/gpu/drm/msm/msm_drv.c