Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp725876pxb; Tue, 2 Feb 2021 16:49:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0DOWulUVfGxupDEwq7rEgDKRbJmxcBB0K2BA5+GIAAkzJfPF+mHhCix9cE5H/3Kay5X0n X-Received: by 2002:a17:906:a14e:: with SMTP id bu14mr600405ejb.303.1612313363715; Tue, 02 Feb 2021 16:49:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313363; cv=none; d=google.com; s=arc-20160816; b=J07AP6ttPLDaQ6I/uOdsAWcCKjhFuUX499Off1lAFKUZblsS5/ddfzplzxwuHtAIeN 9YgrvRW9bk87X5NPnNWc2UhlCocb+Jb/qS/6Gxwi+XMVS4Pf4fUYG+ftgVKJLAnxNSNI V79xcadDP08K4VHkBMoFOAZnsrX9lxKWPYzcpTpEUfzIH/zGcjvPhwzCOJT9ORLQv0+K UpgaUORlvTRZx1yVRPqTVk+BfR1jIE5QkbzB1raInytH3unOULPj9lUqaK053cuerSP9 AZi4BhwQtAF98WMuvPynI056P8BmfO3RGP61N9u2WswoK6LHdBunZCVTr/a68luI71Mt ypcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z+UO/AKUtRgx2D8xQqBdJtK9OEtf0s5krJNe3RLQ12M=; b=ZuO4T0OGXAxYF04raZFhOGEaceWbpiOnLbwXCrBB4mVR0VhOAlAB5aTJDosHduysRg WwSO+xkqiGVRKTI9YkFBxGSFKD7tTOJciEH/ArZPXNyhljRvNrnYmPXBtqZIldGOzyuv U1EmTZfsRFRHQ0yv1KvTMfaRqO5hOWJYvPngJW4PGKM93E9A5E45u/TySICU+oFnVCuJ cQBg8EPvx60EVaTicQdex16TZktkNHd/nDCOtNyjB6gzmx2s0sTSpDvev38rZZYdKvyn Za+aPUL3zY5Ld0Z+LlielDZrMFTat3l3gpI5tkFUNTJ7bswiYPwwdEU4Dh3BiRXVmyr4 tJ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jAWesLH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl11si305968ejb.688.2021.02.02.16.48.59; Tue, 02 Feb 2021 16:49:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jAWesLH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235338AbhBBUBa (ORCPT + 99 others); Tue, 2 Feb 2021 15:01:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:38204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232974AbhBBNrm (ORCPT ); Tue, 2 Feb 2021 08:47:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C162164F98; Tue, 2 Feb 2021 13:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273320; bh=xxpUYpNUwg9WVbKZi1NM8nUZ/wS3c0OgoxdXTyYhosg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jAWesLH1Th8FuYNDLBii1r1KH7I+3/JT+jTxCaTyxUfjTPZup9VJowt7dV/XgJjfS tpVfD57cOxIt+nVJJN0Xogcusrlf8490sD1PEKG8JVAG01uLTAqmwKAU0K3amE16iX 80xyUbomSsWifm6bYFiLN5SuJc5nE8yShP3LUOF0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bastian Beranek , Ben Skeggs Subject: [PATCH 5.10 062/142] drm/nouveau/dispnv50: Restore pushing of all data. Date: Tue, 2 Feb 2021 14:37:05 +0100 Message-Id: <20210202133000.278560691@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bastian Beranek commit fd55b61ebd31449549e14c33574825d64de2b29b upstream. Commit f844eb485eb056ad3b67e49f95cbc6c685a73db4 introduced a regression for NV50, which lead to visual artifacts, tearing and eventual crashes. In the changes of f844eb485eb056ad3b67e49f95cbc6c685a73db4 only the first line was correctly translated to the new NVIDIA header macros: - PUSH_NVSQ(push, NV827C, 0x0110, 0, - 0x0114, 0); + PUSH_MTHD(push, NV827C, SET_PROCESSING, + NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); The lower part ("0x0114, 0") was probably omitted by accident. This patch restores the push of the missing data and fixes the regression. Signed-off-by: Bastian Beranek Fixes: f844eb485eb05 ("drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set()") Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/14 Signed-off-by: Ben Skeggs Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/gpu/drm/nouveau/dispnv50/base507c.c b/drivers/gpu/drm/nouveau/dispnv50/base507c.c index 302d4e6fc52f..788db043a342 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/base507c.c +++ b/drivers/gpu/drm/nouveau/dispnv50/base507c.c @@ -88,7 +88,11 @@ base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) NVVAL(NV507C, SET_CONVERSION, OFS, 0x64)); } else { PUSH_MTHD(push, NV507C, SET_PROCESSING, - NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); + NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE), + + SET_CONVERSION, + NVVAL(NV507C, SET_CONVERSION, GAIN, 0) | + NVVAL(NV507C, SET_CONVERSION, OFS, 0)); } PUSH_MTHD(push, NV507C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8); diff --git a/drivers/gpu/drm/nouveau/dispnv50/base827c.c b/drivers/gpu/drm/nouveau/dispnv50/base827c.c index 18d34096f125..093d4ba6910e 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/base827c.c +++ b/drivers/gpu/drm/nouveau/dispnv50/base827c.c @@ -49,7 +49,11 @@ base827c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) NVVAL(NV827C, SET_CONVERSION, OFS, 0x64)); } else { PUSH_MTHD(push, NV827C, SET_PROCESSING, - NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); + NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE), + + SET_CONVERSION, + NVVAL(NV827C, SET_CONVERSION, GAIN, 0) | + NVVAL(NV827C, SET_CONVERSION, OFS, 0)); } PUSH_MTHD(push, NV827C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8,