Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2281191ybl; Thu, 19 Dec 2019 10:57:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwZUInf44lsCR1CHbk9FB9be1Sh+nsSvUNP6b0x8+uMqntxJsh1xc+oF3N+c1v8lx6j57tS X-Received: by 2002:a05:6830:1b7b:: with SMTP id d27mr10764632ote.78.1576781844862; Thu, 19 Dec 2019 10:57:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781844; cv=none; d=google.com; s=arc-20160816; b=hbmDsRigRbLH7LWcGxIocBrewYD453n7g2Uy0rwH2fSI3Rhf5bjLCXEOCUp7lpy344 lfN8/4tv2dk6IEHXtwqECiGhccwSkenrz/U3ca2TzE77rQ+ZBCs2Pkmr9xZcOVBk979Y xX+npQFgTSRyaM+SairrrYiDIm6aOCIo5iufzapw3Jx87HEUrBD70nnb5xKX9xQTApPp s36MsH/4H9X2IXU4v+gqnY5G/29VWjSQgljtRm18lgS+Py2myUrB9YT+bkGJkgtqigug dCPA0veOJ6ahqUkIOHW8JbpeJ9hLkG0H9Xybz10w4OEL799ELOuVW+lnipcfbhsyD3Ji xhNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yfgmm/c1U9t4lUy+iJVVZPMya1giCQklYMi7xzd4RBo=; b=wxIqWG2F//gA3tcB6M0d7O8/ctHibQ+IQ726nIIe5n3CAX8dpwH7+1Qexga4D5FO6l 2bZ2dRcTYFJUarXKN97FIECmDP/fH5tyrQ6dVxvq3Nj7UarwIRb19YIoVsunx5OXKflV OeN3oYZzGZZLe2w9GdODp9JlSpuW0AKT2UCqlw5JEACzUtpqnTytTWSwk9YELolIT8lS ukA7gvg1L1GWW2G/utfAKAxDm/9oMRasldwztHGGKSUYTDUjdZCi6KGTtZg4paH5tgRE RKHZq1xqWbStpbIW6jwtJkDcAM0rGIVHAa1krKY38kFrSBmbIkWn5CDW3PEuuczEtumO 2q2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NWcuu++t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si3001048otj.24.2019.12.19.10.57.12; Thu, 19 Dec 2019 10:57:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NWcuu++t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730773AbfLSS4I (ORCPT + 99 others); Thu, 19 Dec 2019 13:56:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:52474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730762AbfLSS4F (ORCPT ); Thu, 19 Dec 2019 13:56:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01953206EC; Thu, 19 Dec 2019 18:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781764; bh=F/DzLy0Md+yRJaxTa2YpI3P8cDeNkEsaZq3s1CPzwF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NWcuu++tBXl/frUdaGjzy3Vo3q4rgQLKiikeS8DZhQJc30lsb0jj6KIn74EgJADfj S5pHswLRajGhBNkn4NqynkzdvbtM009hl/DybAu5A/0aKwDm4vLB1hzO/Ah91qXj6z //nubFvBHJmL9rZk5LD1v+O+5ChIB62FivgC99cE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Meelis Roos , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Alex Deucher Subject: [PATCH 5.4 70/80] drm/radeon: fix r1xx/r2xx register checker for POT textures Date: Thu, 19 Dec 2019 19:35:02 +0100 Message-Id: <20191219183141.627747989@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher commit 008037d4d972c9c47b273e40e52ae34f9d9e33e7 upstream. Shift and mask were reversed. Noticed by chance. Tested-by: Meelis Roos Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/radeon/r100.c | 4 ++-- drivers/gpu/drm/radeon/r200.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -1826,8 +1826,8 @@ static int r100_packet0_check(struct rad track->textures[i].use_pitch = 1; } else { track->textures[i].use_pitch = 0; - track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK); - track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK); + track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT); + track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT); } if (idx_value & RADEON_TXFORMAT_CUBIC_MAP_ENABLE) track->textures[i].tex_coord_type = 2; --- a/drivers/gpu/drm/radeon/r200.c +++ b/drivers/gpu/drm/radeon/r200.c @@ -476,8 +476,8 @@ int r200_packet0_check(struct radeon_cs_ track->textures[i].use_pitch = 1; } else { track->textures[i].use_pitch = 0; - track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK); - track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK); + track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT); + track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT); } if (idx_value & R200_TXFORMAT_LOOKUP_DISABLE) track->textures[i].lookup_disable = true;