Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2317491pxy; Tue, 3 Aug 2021 03:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsEWz3i5o4my1f3sYDA+r+snAbc3wIIcP2e9Snk1Lh1LPh+yhWllhwnbk7fnKJEx2DkL3t X-Received: by 2002:a05:6402:13d8:: with SMTP id a24mr24532917edx.158.1627986569814; Tue, 03 Aug 2021 03:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627986569; cv=none; d=google.com; s=arc-20160816; b=rHZlCZ62Sqfc5HiqFlJ4ZSH+Fx5hB/JYewjfe3OJya5UN/KzLrV8+wkpFR1XcBYagq 5sPcHqNGFjlrVmAXEw+zEcdjl0QG6yN5x/QQdqfYFtgFRTPIY89cz8BD17tEQurAs+uR EI4DyxYmoxQYiRCdI5cGDmmK0t2QTQcXKcPaOB6EJ25jQQgM7F222seFA5mkfw6sKK/y wrtlHavzXhMgm4nNeXk1EYgLmhguHDyAUaT+t2A5GtXtfkebbybwbHhokpsMY3lnq7Dc yRqVVaF0AnLevy2gxXlfqN9FS5HGa1GQBDV2M5nfsZNqgHllxYm4Zan/IuZR9aQNgN1x 3Jmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CD6neHzHPjoDd8dxdauboHpEOxJG+rtfwmy3RnpVYAU=; b=phg87yqJxOL+/eGMXvWCi/5PQC5xK80eQ+0wKRMB7r2qAsQoIz9jJeXul2iYFzh2wP rTJ5HH4rE53y0TNaFZ3iZqKs9IUVMMoGvqoxQyQuFFKZTSqPPxHMB9HU/sf+jdi3PNPb DQRlbz+vshPKuuQyJ7VbM++ihNQHAToXAyi1OvrOvOOJdnDzRAcWVFMf4VC9Nf7txGdo /q30k4ciNOYxDY1nTA3GUoJCC5yV/B+11Ni2xNCtK2+rsVGF0LnaObop+9T4NaJTVJgE Rzw+bPunxnq06u8yQu+lb866KFlXx5A6WDhSdxFt7Ers4CbEyIcDEavN1kBj5SXj58ON rm7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uKUH4atr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wq13si10118597ejb.549.2021.08.03.03.29.04; Tue, 03 Aug 2021 03:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uKUH4atr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235258AbhHCK1g (ORCPT + 99 others); Tue, 3 Aug 2021 06:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235296AbhHCK1d (ORCPT ); Tue, 3 Aug 2021 06:27:33 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1432C06175F; Tue, 3 Aug 2021 03:27:22 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id f20-20020a9d6c140000b02904bb9756274cso8322987otq.6; Tue, 03 Aug 2021 03:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CD6neHzHPjoDd8dxdauboHpEOxJG+rtfwmy3RnpVYAU=; b=uKUH4atrDaR/JLojmmlOzgdhs3uX7Xv1tWVjAphKOQTwBs1kRHG6w6vQ3s2Dy4fEUr pbGynpcDWghu7obBLK4CxNguJbd5M12Ru8nwqerBvZwZ0x8QlJMHCR+JiWboOLFCRwEj DkCb49Ctv6zeaHbqugStnotGm9JAoouNVa0zrQHDRTS2NZT/YB8Nl4IF2XJY/LxjZtxp lxhaopguCHFv0VGbhRXa9GPtb22/fridJfBe/JzlVjIWgqSmoJ1mnvFQBFFpFRvxlfJI cP41oz3ynRNhVSuqcOEZG7MQBGu8olId15ykPWeDBKp2EZQvQCbXkpW1yHtV0pUFrz7Q ml2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=CD6neHzHPjoDd8dxdauboHpEOxJG+rtfwmy3RnpVYAU=; b=sHUI6y2umeUO67qO2+0bNGMx11xS9DTX02wbxQrZ0c/83i6O5MPl8AUpfipmuhkx13 Nr90xsvGlIXIo1/ym/jVToLlYT3ZVxZz6vtP3AyWRt0QhitjDrz7zgokTe5qR1F0l13k 85kRJw7MixJuFT9zAs0lYObf9CnWnzMz2Ig3dP2KRXcdIEXuCdeTjQsq7nVOVvUPQdec xFGoc+m7W7my6VK3QB645CoQdRclo9Flp/DkhYGXhDd+T2cC+TVWbY9CkvUIinNr8j1p sjILMSHVED+HuLufjs6J4Y8H+oI3MkAPE62Qhfc3lQRNPb1R8MZbGOCHSkQ9v0Rsdxw0 ciVw== X-Gm-Message-State: AOAM533iXjUF/k4+CpDHkrPeBBhH7umMFBl8yiRZsAq+jdF1+4wYL1tT xHNf1oVcbLXeWXUPjZtXJKanFAhAq8APMxjN1WM= X-Received: by 2002:a9d:6490:: with SMTP id g16mr14922669otl.184.1627986441719; Tue, 03 Aug 2021 03:27:21 -0700 (PDT) MIME-Version: 1.0 References: <20210802121215.703023-1-eizan@chromium.org> <20210802220943.v6.6.Ie4214d2cc73ab276dd7c41d4f63c98e011fb42d4@changeid> In-Reply-To: <20210802220943.v6.6.Ie4214d2cc73ab276dd7c41d4f63c98e011fb42d4@changeid> From: Enric Balletbo Serra Date: Tue, 3 Aug 2021 12:27:07 +0200 Message-ID: Subject: Re: [PATCH v6 6/9] soc: mediatek: mmsys: instantiate mdp virtual device from mmsys To: Eizan Miyamoto Cc: linux-kernel , Chen-Yu Tsai , Houlong Wei , Yong Wu , Enric Balletbo i Serra , devicetree , Chun-Kuang Hu , Matthias Brugger , Linux ARM , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eizan, Thank you for your patch. Missatge de Eizan Miyamoto del dia dl., 2 d=E2=80=99ag= . 2021 a les 14:14: > > A virtual device that is probed by the mtk_mdp_core driver is > instantiated by the mtk_mmsys driver. > > This better reflects the logical organization of the hardware and > driver: there are a number of hardware blocks that are used by the MDP > that have no strict hierarchy, and the software driver is responsible > for driving them properly. > > Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra > --- > > (no changes since v1) > > drivers/soc/mediatek/mtk-mmsys.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-= mmsys.c > index 080660ef11bf..e681029fe804 100644 > --- a/drivers/soc/mediatek/mtk-mmsys.c > +++ b/drivers/soc/mediatek/mtk-mmsys.c > @@ -97,6 +97,7 @@ static int mtk_mmsys_probe(struct platform_device *pdev= ) > struct platform_device *clks; > struct platform_device *drm; > struct mtk_mmsys *mmsys; > + struct platform_device *mdp; > int ret; > > mmsys =3D devm_kzalloc(dev, sizeof(*mmsys), GFP_KERNEL); > @@ -122,10 +123,27 @@ static int mtk_mmsys_probe(struct platform_device *= pdev) > PLATFORM_DEVID_AUTO, NULL, 0)= ; > if (IS_ERR(drm)) { > platform_device_unregister(clks); > - return PTR_ERR(drm); > + ret =3D PTR_ERR(drm); > + goto err_drm; > + } > + > + mdp =3D platform_device_register_data(&pdev->dev, "mtk-mdp", > + PLATFORM_DEVID_AUTO, NULL, 0)= ; > + if (IS_ERR(mdp)) { > + ret =3D PTR_ERR(mdp); > + dev_err(dev, "Failed to register mdp: %d\n", ret); > + goto err_mdp; > } > > return 0; > + > +err_mdp: > + platform_device_unregister(drm); > + > +err_drm: > + platform_device_unregister(clks); > + > + return ret; > } > > static const struct of_device_id of_match_mtk_mmsys[] =3D { > -- > 2.32.0.554.ge1b32706d8-goog >