From patchwork Mon Dec 14 20:51:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11973069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8D59C2BB40 for ; Mon, 14 Dec 2020 20:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD79622473 for ; Mon, 14 Dec 2020 20:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbgLNUxN (ORCPT ); Mon, 14 Dec 2020 15:53:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387825AbgLNUxB (ORCPT ); Mon, 14 Dec 2020 15:53:01 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DD0C0613D3 for ; Mon, 14 Dec 2020 12:52:19 -0800 (PST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 65ED696; Mon, 14 Dec 2020 21:52:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607979137; bh=Pn5LY0V1czTKjaPJi9y6Kzz85SlKDjRDanKEjhfTuwU=; h=From:To:Cc:Subject:Date:From; b=vMmauDCiRqYDe9jzxzpEotJmqHlip6S1U+wkEOokk23w0bkjExzSYslTXUp0izkkW kV0ie7zpHj3TWPNx1V6PvKa0v9kgXR4zHnG0yH35BafKEBwchSMVKijPkdztMPf3gp FhF6/QLBos25WI9dIzJOBIoQFo5yi1k9IOx0m/lI= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, Kieran Bingham Subject: [PATCH v2 0/9] drm: rcar-du: Fix LVDS-related crash Date: Mon, 14 Dec 2020 22:51:59 +0200 Message-Id: <20201214205208.10248-1-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hello, This patch series fixes a crash in the LVDS encoder on D3 and E3 SoCs. See patch 1/9 for details. The next patches are additional cleanups. Patches 4/9 to 6/9 fix incorrect usage of the devm_* API. They could be made simpler by using the proposed drmm_* allocators for encoders and planes ([1]), but those haven't landed yet. Not depending on them also helps backporting those fixes to stable kernels. I will switch to the new helpers when they will be available. [1] https://lore.kernel.org/dri-devel/20200911135724.25833-1-p.zabel@pengutronix.de/ Laurent Pinchart (9): drm: rcar-du: Fix crash when using LVDS1 clock for CRTC drm: rcar-du: Release vsp device reference in all error paths drm: rcar-du: Drop unneeded encoder cleanup in error path drm: rcar-du: Use DRM-managed allocation for VSP planes drm: rcar-du: Use DRM-managed allocation for encoders drm: rcar-du: Embed drm_device in rcar_du_device drm: rcar-du: Replace dev_private with container_of drm: rcar-du: Skip encoder allocation for LVDS1 in dual-link mode drm: rcar-du: Drop local encoder variable drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 12 +-- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 33 +++---- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 16 ++-- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 98 ++++++++++----------- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 2 - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 12 +-- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 8 +- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 28 ++++-- drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 2 +- 9 files changed, 107 insertions(+), 104 deletions(-)