Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1889994lqb; Mon, 27 May 2024 00:18:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKJ9Jqla5+7dCuV0e1armmK32YFq7Ru++YoKNn0icVoerSPAKAeQlQgXpxTi6CV9+HuuFydVz2wv/8mbBjl9XksGjDn3N7dowPRPldDg== X-Google-Smtp-Source: AGHT+IHjnRuD2XEiF4cXYVbEz0MVdxf91lXlYkZI3GsvP09W5duG9P6eetfizMyd/Xz9UcFuj9kA X-Received: by 2002:a17:902:ea05:b0:1f4:81ab:75aa with SMTP id d9443c01a7336-1f481ab859fmr46635705ad.47.1716794330428; Mon, 27 May 2024 00:18:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716794330; cv=pass; d=google.com; s=arc-20160816; b=jTwrTEX1LLlLZ6S5KG6z64CQNyCHbilMnYYsxcphkTWf0AxUy2pJpps7ciARUrrCkx 74WQjMS7Wf+zwqZjMLdiwAZRoEdO3tx9ASpo8v3VXUW80+U+jpgEdQdjAg/Pfyvuf+vQ vkcfXeCAlKLLlmYXiNDvUpW51K/JefqXVxW5QK71318hbZ6vHeCalHrjxkC5jn4xKQYy CGW/HtkpgF2M8cIijjYBCxdripPmjoTCi9uTwU19GQ+wM0UJ9FMaoRbAJ8XGkgw0l8wx Ahc+Id9FGxHd6sxo9SAOQRWRxZMFqfo6RPmv9az5fi63NEmxHwRvoBmDHfKS5HIm0KVk GDtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X/HcY+X0iAsHdzRuxUa8q7blOFA1qc44VzdOT0NN0pc=; fh=2MEqMgFtv0UU6vRqxr7bZe5PL9SVjHMXOnbyfaoR0io=; b=AcQEXA2F/no2FcMLByHcwgKnjMf40Cw1Jzc+m7VuSZcSeMR2+XqkTtj3byJU4QSmjd Z2+J+udxG3yCDDQhO2coDvV3Od5omso7cUbAWrLg2jZZBGKj+DuLwKPAk+LouAzKB9An W5KwPtH6yiiYESWaQHZ8/zlmTzzeGbbVAhUjA+WUeFO+lDcfqQPKTHevOu1R9kOKmSUU 2YlxuBqqij1jGiuiYX9H8mIGvJCyhypuwpCTyGkkeQSroQ7YJSnwpo7VXyqPc8yVq/DM BrIlQlJdpckkU8sc5xFj7SnzH9thWhUtSSRRhCUECjGGeuZplbIpSbcUbLoEjse4gBxJ oaiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@packett.cool header.s=key1 header.b=iy9ORCzh; arc=pass (i=1 spf=pass spfdomain=packett.cool dkim=pass dkdomain=packett.cool dmarc=pass fromdomain=packett.cool); spf=pass (google.com: domain of linux-kernel+bounces-190127-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=packett.cool Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c7c32f6si56984615ad.178.2024.05.27.00.18.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 00:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190127-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@packett.cool header.s=key1 header.b=iy9ORCzh; arc=pass (i=1 spf=pass spfdomain=packett.cool dkim=pass dkdomain=packett.cool dmarc=pass fromdomain=packett.cool); spf=pass (google.com: domain of linux-kernel+bounces-190127-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=packett.cool Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1550B280C21 for ; Mon, 27 May 2024 07:18:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8215117BD5; Mon, 27 May 2024 07:18:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b="iy9ORCzh" Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC779200A9 for ; Mon, 27 May 2024 07:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794323; cv=none; b=i+ZSkyvUyLQCbfW6NmFMwhMjgvWpWqWE8kLBJl2aEYEsc7j+4upZ0+q/vbbTm4291+6m+GIFPF4gNdIKg+qX7FtUctBGzI6gPvjAw3f8YRb83Z3uOGuU+zbK7hmpcKG0soLFGooKiB1LYb8q3ioUobofNsMwaJTrgT2lW90Czps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794323; c=relaxed/simple; bh=Zi33nNAiIDGa0FSB+SFlOzYKSr9pX1z8RzcNuVbH+R0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SbzzmHWsVL3IxoVOSRFkeno23IqzoxgnsW1twexW1QiwGvYiee1IXVedzn9EDLZCfcUXMQmPDpkm2azdAO/rtRfM4qO+lIjx/PUhKa+jpag0/9Q70vXFjpkjXnWl6su5Ti2hJYbl6Wwub2XnTGk7lEhY+CmEVm04IIcdAlkp3Nw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool; spf=pass smtp.mailfrom=packett.cool; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b=iy9ORCzh; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=packett.cool X-Envelope-To: val@packett.cool DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packett.cool; s=key1; t=1716794318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X/HcY+X0iAsHdzRuxUa8q7blOFA1qc44VzdOT0NN0pc=; b=iy9ORCzh7lapaOkZMTEJsmXVG/+BIMfnecYQMWgUjZ2+sq98W3zFVnqaDLifxgDJS2XrSH pqXfwVLJ8PIpmhN4yufkns0BlQG4ykCgGjQLMpzlINXF14ulgAuORgPV+1j9sJRxrbebzI b7hnSCmVc9jO6U7KghD6m/ICuf5rLFHDJ/1JqSIec75UTBjYmG6RDXz8/46cYrxAxT0iIY uGtYK/+pQc+T97tX+QT8gnz6JNrWV2k88u3VWgnHklhVArsgqcKwxOaBh7LbUh0KQOfJs0 DEBJe40GfOwFR5n90lNX2zfx1KbjYxwvL4vg0SmjWklkoAiZL/M375No+Jnq1Q== X-Envelope-To: stable@vger.kernel.org X-Envelope-To: hjc@rock-chips.com X-Envelope-To: heiko@sntech.de X-Envelope-To: andy.yan@rock-chips.com X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: mripard@kernel.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: daniel@ffwll.ch X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: linux-rockchip@lists.infradead.org X-Envelope-To: linux-kernel@vger.kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Val Packett To: Cc: Val Packett , stable@vger.kernel.org, Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] drm/rockchip: vop: clear DMA stop bit upon vblank on RK3066 Date: Mon, 27 May 2024 04:16:33 -0300 Message-ID: <20240527071736.21784-1-val@packett.cool> In-Reply-To: <2024051930-canteen-produce-1ba7@gregkh> References: <2024051930-canteen-produce-1ba7@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On the RK3066, there is a bit that must be cleared, otherwise the picture does not show up on the display (at least for RGB). Fixes: f4a6de8 ("drm: rockchip: vop: add rk3066 vop definitions") Cc: stable@vger.kernel.org Signed-off-by: Val Packett --- v2: doing this on vblank makes more sense; added fixes tag --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 1 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index a13473b2d..2731fe2b2 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1766,6 +1766,12 @@ static void vop_handle_vblank(struct vop *vop) } spin_unlock(&drm->event_lock); + if (VOP_HAS_REG(vop, common, dma_stop)) { + spin_lock(&vop->reg_lock); + VOP_REG_SET(vop, common, dma_stop, 0); + spin_unlock(&vop->reg_lock); + } + if (test_and_clear_bit(VOP_PENDING_FB_UNREF, &vop->pending)) drm_flip_work_commit(&vop->fb_unref_work, system_unbound_wq); } diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h index b33e5bdc2..0cf512cc1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h @@ -122,6 +122,7 @@ struct vop_common { struct vop_reg lut_buffer_index; struct vop_reg gate_en; struct vop_reg mmu_en; + struct vop_reg dma_stop; struct vop_reg out_mode; struct vop_reg standby; }; diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index b9ee02061..9bcb40a64 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -466,6 +466,7 @@ static const struct vop_output rk3066_output = { }; static const struct vop_common rk3066_common = { + .dma_stop = VOP_REG(RK3066_SYS_CTRL0, 0x1, 0), .standby = VOP_REG(RK3066_SYS_CTRL0, 0x1, 1), .out_mode = VOP_REG(RK3066_DSP_CTRL0, 0xf, 0), .cfg_done = VOP_REG(RK3066_REG_CFG_DONE, 0x1, 0), -- 2.45.1