From patchwork Sun Aug 4 20:16:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11074861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD93F17E5 for ; Sun, 4 Aug 2019 20:17:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC1F428803 for ; Sun, 4 Aug 2019 20:17:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB14E28827; Sun, 4 Aug 2019 20:17:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22F4A287A0 for ; Sun, 4 Aug 2019 20:17:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ukvavvy0D6tYViD1ZzTt8kBSQMRyEE2KeHC0/XjiQs4=; b=jd5RgXsRA3mGbQ l+ayklqnKYzia0MIDMo7iUyWiDVABCFPVTYIWiI8jRQ6JTyW69tmQcOy4+822Lmq5zuTGKP95x0NJ wBuwBgBk/A00hTZg+Ee3S/tyxa7qjv/UfxtTGR8MIgQK25hi3LlbBGdI2+07gsYUQ8k9FRZa2/hNg 5YJx3PYh8lnn6xyWLqhLEvGLhZEuxDjK7D8VsQiSxKeszGGdq+OPFBk4r6rDkK2JK0awoYaQCsj0w NU88ks8/z6hZRHDfyV5ep8XiMFo4kVeK4jhg4w1OWG4Mqa0hBlJt7mLufafHM4Q8i5XvtRGQYB8a4 FPGCeui+mRfBiS+bXsLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1huMwC-0008CS-Vd; Sun, 04 Aug 2019 20:17:04 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huMw7-0008BN-7F for linux-arm-kernel@lists.infradead.org; Sun, 04 Aug 2019 20:17:03 +0000 Received: by mail-lj1-x241.google.com with SMTP id p17so77442758ljg.1 for ; Sun, 04 Aug 2019 13:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3JqNJR/tbllInqzUqAgcIBZy8c2/hdUEosVg+96WWSo=; b=OFo5m7UYW1t09ibVa24pGV8LSs92/jiLMbnmIRIrUAONwdrp/xVYrUT41t4kq7FAXt XWCk8JrCjhMvDYV4roa7yWoSu242TuRiw9Ov/1WsXSkKId0Yt+d1PIlxD5OImGaol8Z7 zrglP6rxfB9ty7sP5J7PDoED29Z7fxR6dK+xKEnLZvKfQkRVYJ5lnlgucCLlkbag3ZJq tIl9ttBBlOUipT0Kt8rzjyQ7gvYGhWrir+mA820NfHzaPdOc2cSw2MG4ECkDp/MYAARi WksCS7ziA1MMweO/fYeDo7M870dhtafgJdCrLF5JbbsXWYnV9Z6Eydf5FTn//cJ6tYZ+ AbMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=3JqNJR/tbllInqzUqAgcIBZy8c2/hdUEosVg+96WWSo=; b=Zk5ZZcSHmlcurx6NEZxM3AnPts8cj0c/Mrv0iWJRwKd8PHEyBYAnMM89eVc6w13i8g qV4XKrZa3gJyxL/kAcKQPvwYwt8sEtyCDv75iP402EzT1NTTu8pdiKYl3Voux+UJgCxf e0FqJwh+nGmQdzCwh+0appnwh47ud/UIONgxeae5aYiSVfqNQDxdTvpyBdM8O/Xuh2Dt RYbdxX2X/io4wSifbcM4QUL93QnYIW1uho4878W/w1xLXGpV7NbiogvMz3t8qlHRLOnP yiAxHJIQ2xBitt8c47/YgHc1ugHULCv6ofjLLig8nMEe+lZlQ3GZiKLNjnJ+zch1DKTG dyfQ== X-Gm-Message-State: APjAAAXGOJa2lHY8rE3l+FOFMjl2IwMJ7uMEr7IsN920YFQfpVL7nCeu V13N63tpmeRrVuRiH7ArRZA= X-Google-Smtp-Source: APXvYqxubNgp0cYLhN8wuC7+2LA2WOAC50nfeiKvF5Oq3p74Zf9n27xnchcBuEjvjjCBlvoc6/29TQ== X-Received: by 2002:a2e:8559:: with SMTP id u25mr13365606ljj.224.1564949816865; Sun, 04 Aug 2019 13:16:56 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id p87sm16540794ljp.50.2019.08.04.13.16.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 13:16:56 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Thierry Reding Subject: [PATCH v1 0/16] drm: panel related updates Date: Sun, 4 Aug 2019 22:16:21 +0200 Message-Id: <20190804201637.1240-1-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190804_131659_287830_535468B8 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , Linus Walleij , Stefan Agner , Andrzej Hajda , Laurent Pinchart , Benjamin Gaignard , Fabio Estevam , Marek Vasut , Laurent Pinchart , Joonyoung Shim , Sam Ravnborg , Krzysztof Kozlowski , Jonathan Hunter , Maxime Ripard , Kukjin Kim , Allison Randal , Philipp Zabel , NXP Linux Team , Pengutronix Kernel Team , Jonas Karlman , Sascha Hauer , Alison Wang , Maarten Lankhorst , Gwan-gyeong Mun , Inki Dae , Alexios Zavras , linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Thomas Gleixner , Sean Paul , linux-arm-kernel@lists.infradead.org, Jernej Skrabec , Shawn Guo , Seung-Woo Kim , Vincent Abriou , Kyungmin Park , Daniel Vetter , Enrico Weigelt Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The first 9 patches replaces direct use of the drm_panel function pointers with their drm_panel_* counterparts. The function pointers are only supposed to be used by the drm_panel infrastructure and direct use are discouraged. ili9322 is updated to handle bus_flags in get_modes like everyone else. This is in preparation for a later patch series where controller becomes an arugument to get_modes() and not like today where drm_panel is attached to a controller. The remaining patches move functionality to the drm_panel core that today are repeated in many drivers. As preparation for this the inline functions are moved to drm_panel.c and kernel-doc is made inline. panel-simple is updated to benefit from the additional infrastructure and is an example for the simplifications that can be done. The patchset has been tested on my embedded target, and build tested. Feedback welcome! The "fix opencoded" patches are all independent and can be applied out of order. They were kept here to keep panel related patches in one series. Sam Cc: Alexios Zavras Cc: Alison Wang Cc: Allison Randal Cc: Andrzej Hajda Cc: Benjamin Gaignard Cc: Daniel Vetter Cc: David Airlie Cc: Enrico Weigelt Cc: Fabio Estevam Cc: Gwan-gyeong Mun Cc: Inki Dae Cc: Jernej Skrabec Cc: Jonas Karlman Cc: Jonathan Hunter Cc: Joonyoung Shim Cc: Krzysztof Kozlowski Cc: Kukjin Kim Cc: Kyungmin Park Cc: Laurent Pinchart Cc: Laurent Pinchart Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: Maarten Lankhorst Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sam Ravnborg Cc: Sascha Hauer Cc: Sean Paul Cc: Seung-Woo Kim Cc: Shawn Guo Cc: Stefan Agner Cc: Thierry Reding Cc: Thomas Gleixner Cc: Vincent Abriou Sam Ravnborg (16): drm/bridge: tc358767: fix opencoded use of drm_panel_* drm/exynos: fix opencoded use of drm_panel_* drm/exynos: fix opencoded use of drm_panel_* drm/imx: fix opencoded use of drm_panel_* drm/fsl-dcu: fix opencoded use of drm_panel_* drm/msm: fix opencoded use of drm_panel_* drm/mxsfb: fix opencoded use of drm_panel_* drm/sti: fix opencoded use of drm_panel_* drm/tegra: fix opencoded use of drm_panel_* drm/panel: ili9322: move bus_flags to get_modes() drm/panel: move drm_panel functions to .c file drm/panel: use inline comments in drm_panel.h drm/panel: drop return code from drm_panel_detach() drm/panel: call prepare/enable only once drm/panel: add backlight support drm/panel: simple: use drm_panel infrastructure drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 3 +- drivers/gpu/drm/bridge/tc358767.c | 10 +- drivers/gpu/drm/drm_panel.c | 185 ++++++++++++++++- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 10 +- drivers/gpu/drm/imx/imx-ldb.c | 11 +- drivers/gpu/drm/imx/parallel-display.c | 11 +- .../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_out.c | 2 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 34 ++- drivers/gpu/drm/panel/panel-simple.c | 73 +------ drivers/gpu/drm/sti/sti_dvo.c | 8 +- drivers/gpu/drm/tegra/output.c | 2 +- include/drm/drm_panel.h | 227 +++++++++++---------- 15 files changed, 349 insertions(+), 235 deletions(-) Reviewed-by: Emil Velikov