Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1396654ybf; Thu, 27 Feb 2020 10:09:34 -0800 (PST) X-Google-Smtp-Source: APXvYqydWG8jMdkjqyZOV823TaA4Omq09jQbO6XvfeiELHMrthxFTwLPadpsw2GpavporplzJEhd X-Received: by 2002:a9d:7508:: with SMTP id r8mr153501otk.116.1582826974330; Thu, 27 Feb 2020 10:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582826974; cv=none; d=google.com; s=arc-20160816; b=mo8HbJD+pyJEnJGLSHNpDD44l2BoT7kUEcBZGPwEQnIka7Q9FHL5zJ0tukWs2ii9qz +ItAtvB/gjgKvLoRGaIysUb1Fn9D/lP9tqXXpGE6SNLtzertBNR/bIg58MuSVCUBlUAm yAIsSJLqf+yenZJVDiY0FJtQAp4JI9NQ+yVcYLoBcXHwl8l3kJWzepc90KBbam2TpFzl rUIJaHyQLGqdCcf43qBxvDtLjPFG3C1nVjOdh4g3rmU5klQ2uzIHMgwSGtkGizL9NNUG IjFATMUHRfA2hYmFOYr/8dbhK1DzULnWVEvGk1WynLCQST9JHChkQAUMsKU0dRw5Lac2 joHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=A/5I/jainFIWoBztbzA/qAjUE1V0j8A7Xv1PSdLQMek=; b=AE3GiJPmOcvcCgDLoysYKg7+S3ogM6Su1OZ/6HrL0RBr3KHHihPyUmYYeWRoui47rH tZvHoRY7fBMFejIipcnORKhH7xrN+I95XCg3ZvcqLzZyeGENHxtbB5gJfwdcFZzttPUu W1Vrj7f2UJgTdCfyoQlQ70D90H9wN+WGhwP6RkRVgmRgBRUDNWwXMDeTg29HUMU9hybM f+eQgoWbukB9hr29iUJ1lFNED2biNtEX2t2KhTirGwv5hPQV+Zq5eEU81DkcT90YXZl1 n7TSQLai1qB6fl9BCaffOuel5jyvjpu1YKZoKR3o0Sl8/+6OiauIBi2W1387F7nly79t V0DQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si2126132otk.251.2020.02.27.10.09.20; Thu, 27 Feb 2020 10:09:34 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729580AbgB0SJJ (ORCPT + 99 others); Thu, 27 Feb 2020 13:09:09 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40778 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbgB0SJJ (ORCPT ); Thu, 27 Feb 2020 13:09:09 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 255672963D9 From: Enric Balletbo i Serra To: robh+dt@kernel.org, mark.rutland@arm.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, mturquette@baylibre.com, sboyd@kernel.org, ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com Cc: Mauro Carvalho Chehab , rdunlap@infradead.org, dri-devel@lists.freedesktop.org, Weiyi Lu , Seiya Wang , linux-clk@vger.kernel.org, Collabora Kernel ML , mtk01761 , Allison Randal , Thomas Gleixner , wens@csie.org, Kate Stewart , Greg Kroah-Hartman , Houlong Wei , Matthias Brugger , linux-media@vger.kernel.org, devicetree@vger.kernel.org, sean.wang@mediatek.com, frank-w@public-files.de, Minghsiu Tsai , Andrew-CT Chen , linux-mediatek@lists.infradead.org, hsinyi@chromium.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, Richard Fontana , linux-kernel@vger.kernel.org, matthias.bgg@kernel.org, Daniel Vetter Subject: [PATCH v10 0/5] arm/arm64: mediatek: Fix mt8173 mmsys device probing Date: Thu, 27 Feb 2020 19:08:53 +0100 Message-Id: <20200227180858.1514157-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear all, Those patches are intended to solve an old standing issue on some Mediatek devices (mt8173, mt2701 and mt2712 are affected by this issue). Up to now both drivers, clock and drm are probed with the same device tree compatible. But only the first driver gets probed, which in effect breaks graphics on those devices. The MMSYS (Multimedia subsystem) in Mediatek SoCs has some registers to control clock gates (which is used in the clk driver) and some registers to set the routing and enable the differnet blocks of the display and MDP (Media Data Path) subsystem. On this series the clk driver is not a pure clock controller but a system controller that can provide access to the shared registers between the different drivers that need it (mediatek-drm and mediatek-mdp). Hence the MMSYS clk driver was moved to drivers/soc/mediatek and is the entry point (parent) which will trigger the probe of the corresponding mediatek-drm driver. **IMPORTANT** This series only fixes the issue on mt8173 to make it simple and as is the only platform I can test. Similar changes should be applied for mt2701 and mt2712 to have display working. For reference, here are the links to the old discussions: * v9: https://patchwork.kernel.org/project/linux-clk/list/?series=247591 * v8: https://patchwork.kernel.org/project/linux-mediatek/list/?series=244891 * v7: https://patchwork.kernel.org/project/linux-mediatek/list/?series=241217 * v6: https://patchwork.kernel.org/project/linux-mediatek/list/?series=213219 * v5: https://patchwork.kernel.org/project/linux-mediatek/list/?series=44063 * v4: * https://patchwork.kernel.org/patch/10530871/ * https://patchwork.kernel.org/patch/10530883/ * https://patchwork.kernel.org/patch/10530885/ * https://patchwork.kernel.org/patch/10530911/ * https://patchwork.kernel.org/patch/10530913/ * v3: * https://patchwork.kernel.org/patch/10367857/ * https://patchwork.kernel.org/patch/10367861/ * https://patchwork.kernel.org/patch/10367877/ * https://patchwork.kernel.org/patch/10367875/ * https://patchwork.kernel.org/patch/10367885/ * https://patchwork.kernel.org/patch/10367883/ * https://patchwork.kernel.org/patch/10367889/ * https://patchwork.kernel.org/patch/10367907/ * https://patchwork.kernel.org/patch/10367909/ * https://patchwork.kernel.org/patch/10367905/ * v2: No relevant discussion, see v3 * v1: * https://patchwork.kernel.org/patch/10016497/ * https://patchwork.kernel.org/patch/10016499/ * https://patchwork.kernel.org/patch/10016505/ * https://patchwork.kernel.org/patch/10016507/ Best regards, Enric Changes in v10: - Update the binding documentation for the mmsys system controller. - Renamed to be generic mtk-mmsys - Add driver data support to be able to support diferent SoCs - Introduced a new patch to move routing control into mmsys driver. - Removed the patch to use regmap as is not needed anymore. - Match driver data to get display routing. Changes in v9: - Move mmsys to drivers/soc/mediatek (CK) - Do not move the display routing from the drm driver (CK) Changes in v8: - Be a builtin_platform_driver like other mediatek mmsys drivers. - New patch introduced in this series. Changes in v7: - Free clk_data->clks as well - Get rid of private data structure Enric Balletbo i Serra (3): dt-bindings: mediatek: Update mmsys binding to reflect it is a system controller soc / drm: mediatek: Move routing control to mmsys device soc / drm: mediatek: Fix mediatek-drm device probing Matthias Brugger (2): drm/mediatek: Omit warning on probe defers soc: mediatek: Move mt8173 MMSYS to platform driver .../bindings/arm/mediatek/mediatek,mmsys.txt | 7 +- drivers/clk/mediatek/clk-mt8173.c | 104 ----- drivers/gpu/drm/mediatek/mtk_disp_color.c | 5 +- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 5 +- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 5 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 12 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 13 +- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 259 +---------- drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 7 - drivers/gpu/drm/mediatek/mtk_drm_drv.c | 44 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 8 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 +- drivers/soc/mediatek/Kconfig | 7 + drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-mmsys.c | 435 ++++++++++++++++++ include/linux/soc/mediatek/mtk-mmsys.h | 19 + 16 files changed, 529 insertions(+), 406 deletions(-) create mode 100644 drivers/soc/mediatek/mtk-mmsys.c create mode 100644 include/linux/soc/mediatek/mtk-mmsys.h -- 2.25.0