From patchwork Fri Dec 4 22:01:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11952435 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 4C331C4361A for ; Fri, 4 Dec 2020 22:01:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00F2822CAE for ; Fri, 4 Dec 2020 22:01:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00F2822CAE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C4A56E040; Fri, 4 Dec 2020 22:01:48 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 680046E040 for ; Fri, 4 Dec 2020 22:01:47 +0000 (UTC) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 13E4399A; Fri, 4 Dec 2020 23:01:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607119305; bh=P6ebxqaRV9bCymyha5aYaBu0nIi1Oan3Apmv3xvyjts=; h=From:To:Cc:Subject:Date:From; b=HqqADjrSRmndwfpJyz+UHISwR8j5YD5cBZT5VAnEZjD/2ovCRK3IOYOYTaFP5YxPX m2U96Q8DJkf5o49jgqNmnN7nDk53ejK3Ll+9GBy2baWpXT3Tsx0H52NvwFYKiPgWlS tvA1NDfBp9pBL0fM1GxJyMpgM67jcHkzJ7mVkMRk= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/9] drm: rcar-du: Fix LVDS-related crash Date: Sat, 5 Dec 2020 00:01:30 +0200 Message-Id: <20201204220139.15272-1-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, Kieran Bingham , Kuninori Morimoto Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 | 13 ++- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 95 +++++++++++---------- 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(+), 98 deletions(-)