Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10055534rwd; Wed, 21 Jun 2023 15:53:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ55/EH+gvcULoWjjk7Y5tQhlD+3wXi/CmqJNkyy92ViJkShn9l54+dgtiC3FdOwtpRcMGk1 X-Received: by 2002:a17:90a:a6e:b0:25b:dd3e:d3c7 with SMTP id o101-20020a17090a0a6e00b0025bdd3ed3c7mr10475786pjo.3.1687388011693; Wed, 21 Jun 2023 15:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687388011; cv=none; d=google.com; s=arc-20160816; b=BJzvpHQV6tYA3pYV+KWLNbS/GbHMmVazj/mgbVzDpzX1b6uwdjTMIh0nglEWlq2TjM NW1K2Hsx7DCewZ95QT1dQ+tuSX9a1zipyTuAeQij6wEu01v/pcV7Ae2LXWJGyMRFk3bg gbCxCBk5wJLBcTpFAP1qfgClrGnJTSQSzw9tjLuyoeTKz7QYOL8ZwwgZOPUk5vyQEb+V YCvSjMMYVxbohx7NoNz+tG42V3eKjOg3YChMqWq3shYorpIstco3/ZeOnqkx5IpMswUx McrFL7d0tTeRckC9Kj5HqlhxN9qNrFcOsJECO5LcBfLo5l38NbynSN/YE+u7l1OZKVae t5gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:mime-version :references:in-reply-to:message-id:date:subject:from:dkim-signature; bh=W99jR6zQr9o9HH0LFWjkqVeyLEmhww0LQ1TODMrD+JU=; b=N5Oz8NTkDa0fN/UQJ5vgVV8DIonz1aq0M1fcKGSKkH38ulOm5sjPTDy3MePpYAsOUj AMJqPJFzdNpnTUbcMxmVeh+B/1oY0kQepMCBuJR4eaZvLr2qk+Tpmpv8umhI0RPph9y7 dFYZF7lXTJrYHHSnpWPp3oAGq86/UH80+UkQBUNXvCUlibqQjJ7J4TRj/Dl8t7I2H5fq NMmzqS3Wb5XylpdUW/wIKh3bLSBbWAFLVMHc4pjFdSdSkIdnaqS1U6ePrgT1NyY4sVin DEGqA9WJCTIKzhbA0QJwklqMysL02cCiH/VQi2XfV39s/0y71RIxH8d/puTdug8vy8tr d5eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b=lgYVrVqz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a17090a694b00b002590bf12fedsi344247pjm.181.2023.06.21.15.53.19; Wed, 21 Jun 2023 15:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b=lgYVrVqz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbjFUWdV (ORCPT + 99 others); Wed, 21 Jun 2023 18:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjFUWdT (ORCPT ); Wed, 21 Jun 2023 18:33:19 -0400 Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85EF1173F for ; Wed, 21 Jun 2023 15:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=W99jR6zQr9o9HH0LFWjkqVeyLEmhww0LQ1TODMrD+JU=; b=lgYVrVqzL5xtT/wvZAyliCCJFvkwGuTcAcJfKQdzdxZC6nLMwUo9oDusU22C1uWycY8I p34S3bqatApfjKJTD6B4eqk7llOn5/Xibjn/59rFvUNYJpcXcORsPCo/1q8lBzu49gqfjB 5PDLZaTyULgvju+D0MFe6J6rsx8c/hdQbcyDzjbI6MDJnr3FbvWFMIIF/X0/Gt/wgODH29 AMiYWHdlvJEungau2LBFg6UBFDagsmxX5TqNHt+ZoboL6wu8V4cakUrMw9jhJCfkqgkEj3 F40YikYplgk68+/3que0WX9V4L4kVAXHsY7Sm/jyaWEFZ3bd0BYwBi10ZNkv5yNA== Received: by filterdrecv-84b96456cb-hrvlt with SMTP id filterdrecv-84b96456cb-hrvlt-1-64937AAC-29 2023-06-21 22:33:16.784398642 +0000 UTC m=+3624881.780498603 Received: from bionic.localdomain (unknown) by geopod-ismtpd-0 (SG) with ESMTP id q2JBcGBES7ak8zO87bOzoQ Wed, 21 Jun 2023 22:33:16.341 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 1/5] drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs Date: Wed, 21 Jun 2023 22:33:17 +0000 (UTC) Message-ID: <20230621223311.2239547-2-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230621223311.2239547-1-jonas@kwiboo.se> References: <20230621223311.2239547-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h4IxyhjudaBMscryW?= =?us-ascii?Q?yil2MxaaDxax+ugZQXodSqRHYB6mo1lanwr1jqt?= =?us-ascii?Q?Ei9avORGicVCxu+gicqUMciYzh1qKi3mMrSCg1d?= =?us-ascii?Q?PUSBMXm9wLuXzM76H6Sr+4cVwqlUT3w933cPfI=2F?= =?us-ascii?Q?Va59vtrjACEYW2+1Zc1Kd3y6fVmW+iocbJHw78?= To: Sandy Huang , Heiko Stuebner , David Airlie , Daniel Vetter , Mark Yao Cc: Maarten Lankhorst , 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== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct rockchip_crtc_state members such as output_type, output_bpc and enable_afbc is always reset to zero in the atomic_duplicate_state crtc funcs. Fix this by using kmemdup on the subclass rockchip_crtc_state struct. Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config") Signed-off-by: Jonas Karlman Reviewed-by: Sascha Hauer --- v2: - Collect r-b tag drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index a530ecc4d207..60b23636a3fe 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1614,7 +1614,8 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc) if (WARN_ON(!crtc->state)) return NULL; - rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL); + rockchip_state = kmemdup(to_rockchip_crtc_state(crtc->state), + sizeof(*rockchip_state), GFP_KERNEL); if (!rockchip_state) return NULL; -- 2.41.0