dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Tom St Denis" <tom.stdenis@amd.com>,
	"Sasha Levin" <sashal@kernel.org>,
	"Felix Kuehling" <Felix.Kuehling@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH AUTOSEL 5.6 075/149] drm/amdgpu: fix parentheses in amdgpu_vm_update_ptes
Date: Sat, 11 Apr 2020 19:02:32 -0400	[thread overview]
Message-ID: <20200411230347.22371-75-sashal@kernel.org> (raw)
In-Reply-To: <20200411230347.22371-1-sashal@kernel.org>

From: Christian König <christian.koenig@amd.com>

[ Upstream commit bfcd6c69e4c3f73f2f92b997983537f9a3ac3b29 ]

For the root PD mask can be 0xffffffff as well which would
overrun to 0 if we don't cast it before we add one.

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index d16231d6a790b..67e7422032265 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1498,7 +1498,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
 		incr = (uint64_t)AMDGPU_GPU_PAGE_SIZE << shift;
 		mask = amdgpu_vm_entries_mask(adev, cursor.level);
 		pe_start = ((cursor.pfn >> shift) & mask) * 8;
-		entry_end = (uint64_t)(mask + 1) << shift;
+		entry_end = ((uint64_t)mask + 1) << shift;
 		entry_end += cursor.pfn & ~(entry_end - 1);
 		entry_end = min(entry_end, end);
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-04-11 23:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200411230347.22371-1-sashal@kernel.org>
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 010/149] drm/amd/display: differentiate vsc sdp colorimetry use criteria between MST and SST Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 015/149] drm/amd/display: Explicitly disable triplebuffer flips Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 016/149] drm/amd/display: Fix test pattern color space inconsistency for Linux Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 023/149] drm/amdgpu: check GFX RAS capability before reset counters Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 031/149] drm/tegra: dc: Release PM and RGB output when client's registration fails Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 033/149] drm/amd/display: Stop if retimer is not available Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 036/149] drm/amd/display: writing stereo polarity register if swapped Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 039/149] drm/amd/display: Fix default logger mask definition Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 046/149] drm/amd/display: Only round InfoFrame refresh rates Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 047/149] drm/amd/display: Fix HDMI repeater authentication Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 049/149] drm/panel: simple: fix osd070t1718_19ts sync drive edge Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 059/149] drm/sun4i: dsi: Use NULL to signify "no panel" Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 065/149] drm/amdgpu: Fix missing error check in suspend Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 068/149] drm/amd/display: always apply T7/T9 delay logic Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 069/149] drm/omap: fix possible object reference leak Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 072/149] drm/stm: ltdc: check crtc state before enabling LIE Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 073/149] fbdev: potential information leak in do_fb_ioctl() Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 074/149] drm/crc: Actually allow to change the crc source Sasha Levin
2020-04-11 23:02 ` Sasha Levin [this message]
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 076/149] drm/amd/display: dc_get_vmid_use_vector() crashes when get called Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 087/149] drm/amd/display: dal_ddc_i2c_payloads_create can fail causing panic Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 088/149] drm/amd/display: System crashes when add_ptb_to_table() gets called Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 089/149] drm/omap: dss: Cleanup DSS ports on initialisation failure Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 090/149] drm/amdkfd: Fix a memory leak in queue creation error handling Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 095/149] drm/amd/display: Fix dmub_psr_destroy() Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 105/149] drm/msm: fix leaks if initialization fails Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 106/149] drm/msm/a5xx: Always set an OPP supported hardware value Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 149/149] PCI: Use ioremap(), not phys_to_virt() for platform ROM Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200411230347.22371-75-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=Felix.Kuehling@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tom.stdenis@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).