From patchwork Tue Jun 20 06:47:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 13285221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D1A1EB64D8 for ; Tue, 20 Jun 2023 06:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-ID:Date: Subject: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=GJe+LAD0xzmcWS7bXFPw5jmGIWJvfMfucgUZfQRLi2Q=; b=fg9b4CqZsKmCNa vnMr/hw7ejON4YVPVZ4xGHTqvkWKnJ3pTT4q9mTYeM41mON/huZe+ATXZ3A96caJ38tNzpdeLK8fx HbPxQjChk1vaK20eirScEt5+c9m/krry9p0anuomsMXU9w8yrRGMHXH3U64rKQ545ZHpXi1101NG4 H8K1zkkqDSGHlMYjizT3HEFup6MTPTe6wrQ9kOurVcnr7XsOV70RzuWg1v60lm1N9+5t0iaWovpvf CoBogexU65sgvZqeE3tQN4C0rsxzQ0FE4mvI6c50Wc0X8JT1dLRULW6PR/NSuxB1jr2dKw++yE8DS 2Srz/JLa560A3qVTC59w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBV9T-00AIcV-0u; Tue, 20 Jun 2023 06:47:43 +0000 Received: from s.wrqvtzvf.outbound-mail.sendgrid.net ([149.72.126.143]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBV9Q-00AIZU-0p for linux-arm-kernel@lists.infradead.org; Tue, 20 Jun 2023 06:47:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=/OiFg9zrUL7FLkxH5IitcBTJNO1C0qlvkkDfhUrYB7E=; b=OSZ64m+wuJFPFHqsz+9OOHnUMY4g9X4S6PuFLitLVqb3QIK47vi/CVlp/2/Ip6BRgW7S rfF4R+6I83EwBwvit78rji+e0k0wojC2PqiBNEASIcvT32oOdLlA75q0t43Wh6CF5FxycN s/jY6zDsS3q29oaNqqm4cQAxn2tnV2eNNSuWoPnBUUkm7jMiSo+5rPX17EwGFlDvHKrsOH Iwm+aA4z10w0VaBrb8mRPWTpmWiy2chcmI6oQ/nBUI0H/CAk+WzdXJIMwfd1ZaCd0Y9gf0 Q07Q1ObxtXy+5zT7Szu5tsBTL04cvGOAIGqedaH5Go2antUvLrSHQP0I41jzpqAQ== Received: by filterdrecv-8684c58db7-wf85l with SMTP id filterdrecv-8684c58db7-wf85l-1-64914B87-1 2023-06-20 06:47:35.167912827 +0000 UTC m=+3481761.974497447 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id PBMypHKAT3KFA1SgmOnoHA Tue, 20 Jun 2023 06:47:34.794 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 0/4] drm/rockchip: Fix crtc duplicate state and crtc reset funcs Date: Tue, 20 Jun 2023 06:47:35 +0000 (UTC) Message-ID: <20230620064732.1525594-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-SG-EID: TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxAfZekEeQsTe+RrMu3cja6a0hyjMKERdf95KMPdLEAIYz/9/CZufW1gBVLLc0p++89OiAC6+VYSCZLnn0MwskFyyqsX3ZLfdoaTVik4Smb7c9wfBy2UfxVnn0yRW+NmkJX79THSca//zFV/HiHpTxs30U18RYe8H55jZ0S+zVq49V8/R59MONN8ng+SgqGKG9rG/34zJok5j4OHqVJrbxqH+OA== To: Sandy Huang , Heiko Stuebner , David Airlie , Daniel Vetter Cc: Mark Yao , Andy Yan , Sascha Hauer , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230619_234740_421281_BA7CF41C X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series fixes a reset of state in duplicate state crtc funcs for VOP driver, a possible crash and ensure crtc reset helper is called in VOP2 driver. Patch 1 use kmemdup instead of kzalloc to duplicate the crtc state. Patch 2 change to use crtc and plane cleanup helpers directly. Patch 3 adds a crash guard for empty crtc state. Patch 4 adds a missing call to crtc reset helper. This is the next part of an ongoing effort to upstream HDMI 2.0 support used in LibreELEC for the past 3+ years. This series is also available at [1]. [1] https://github.com/Kwiboo/linux-rockchip/commits/next-20230619-duplicate-state Jonas Karlman (4): drm/rockchip: vop: Fix crtc duplicate state drm/rockchip: vop: User cleanup helpers directly as destroy ops drm/rockchip: vop2: Don't crash for invalid duplicate_state drm/rockchip: vop2: Add missing call to crtc reset helper drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 19 +++-------- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 36 +++++++++----------- 2 files changed, 21 insertions(+), 34 deletions(-)