Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deepin-Kernel-SIG] [Upstream] Update kernel base to 6.6.50 #410

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
788d700
drm/fb-helper: Don't schedule_work() to flush frame buffer during pan…
qzhuo2 Jul 3, 2024
b88c070
drm: panel-orientation-quirks: Add quirk for OrangePi Neo
philmmanjaro Jul 15, 2024
8ae7969
scsi: ufs: core: Check LSDBS cap when !mcq
Jul 9, 2024
ec3575c
scsi: ufs: core: Bypass quick recovery if force reset is needed
ptr324 Jul 12, 2024
cb18c21
btrfs: tree-checker: validate dref root and objectid
adam900710 Jul 15, 2024
bf19ee0
ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown
tiwai Jul 26, 2024
075d5ff
ALSA: hda/conexant: Mute speakers at suspend / shutdown
tiwai Jul 26, 2024
aed1362
ALSA: ump: Transmit RPN/NRPN message at each MSB/LSB data reception
tiwai Jul 31, 2024
4c1046d
ALSA: ump: Explicitly reset RPN with Null RPN
tiwai Jul 31, 2024
3607eae
ALSA: seq: ump: Use the common RPN/bank conversion context
tiwai Jul 31, 2024
f409284
ALSA: seq: ump: Transmit RPN/NRPN message at each MSB/LSB data reception
tiwai Jul 31, 2024
f9e29b0
ALSA: seq: ump: Explicitly reset RPN with Null RPN
tiwai Jul 31, 2024
8386c32
net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule
kliteyn Jul 30, 2024
da10854
smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp
pcacjr Aug 1, 2024
317e8a5
ASoC: amd: yc: Support mic on HP 14-em0002la
brunoanc Jul 29, 2024
d1226a5
spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
Jul 30, 2024
4d3790e
i2c: Fix conditional for substituting empty ACPI functions
rfvirgil Aug 2, 2024
4768502
dma-debug: avoid deadlock between dma debug vs printk and netconsole
rikvanriel Aug 6, 2024
a63e1f0
net: usb: qmi_wwan: add MeiG Smart SRM825L
RadxaYuntian Aug 3, 2024
4e8a77f
ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6
kfsz Aug 7, 2024
56e6f58
ASoC: codecs: ES8326: button detect issue
Michael-zy2000 Aug 7, 2024
b43110f
mptcp: make pm_remove_addrs_and_subflows static
Mar 1, 2024
e83f95d
mptcp: pm: fix RM_ADDR ID for the initial subflow
matttbe Aug 28, 2024
6324cfa
selftests: mptcp: userspace pm create id 0 subflow
geliangtang Nov 28, 2023
8a42199
selftests: mptcp: dump userspace addrs list
Mar 1, 2024
bf2ae36
selftests: mptcp: userspace pm get addr tests
Mar 1, 2024
4dfdb5c
selftests: mptcp: declare event macros in mptcp_lib
Mar 8, 2024
e428b42
selftests: mptcp: join: cannot rm sf if closed
matttbe Aug 26, 2024
83c673b
selftests: mptcp: add explicit test case for remove/readd
Jul 27, 2024
fd77448
selftests: mptcp: join: check re-using ID of unused ADD_ADDR
matttbe Aug 19, 2024
712ff09
selftests: mptcp: join: check re-adding init endp with != id
matttbe Aug 28, 2024
83303e1
selftests: mptcp: add mptcp_lib_events helper
Sep 3, 2024
1f27504
selftests: mptcp: join: validate event numbers
matttbe Sep 3, 2024
dff37b4
selftests: mptcp: join: check re-re-adding ID 0 signal
matttbe Sep 3, 2024
fe174b4
selftests: mptcp: join: test for flush/re-add endpoints
matttbe Aug 19, 2024
0f0ed62
selftests: mptcp: join: disable get and dump addr checks
matttbe Sep 4, 2024
496616b
selftests: mptcp: join: stop transfer when check is done (part 2.2)
matttbe Sep 4, 2024
f65b2f1
mptcp: avoid duplicated SUB_CLOSED events
matttbe Sep 3, 2024
fbf51a6
mptcp: pr_debug: add missing \n at the end
matttbe Sep 3, 2024
9c5cd8a
drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr
Apr 24, 2024
4819764
drm/amd/display: Assign linear_pitch_alignment even for VM
Apr 16, 2024
b07016e
drm/amdgpu: fix overflowed array index read warning
Apr 25, 2024
f5ba421
drm/amdgpu/pm: Check the return value of smum_send_msg_to_smc
Apr 26, 2024
5faaf55
drm/amd/pm: fix uninitialized variable warning
Jie1zhang Apr 28, 2024
6c78037
drm/amd/pm: fix uninitialized variable warning for smu8_hwmgr
Apr 26, 2024
3eb7c72
drm/amd/pm: fix warning using uninitialized value of max_vid_step
Jie1zhang Apr 29, 2024
a9653f7
drm/amd/pm: Fix negative array index read
Jie1zhang Apr 30, 2024
6846f59
drm/amd/pm: fix the Out-of-bounds read warning
Jie1zhang Apr 30, 2024
cb46b36
drm/amd/pm: fix uninitialized variable warnings for vega10_hwmgr
Apr 28, 2024
9ea72f2
drm/amdgpu: avoid reading vf2pf info size from FB
Apr 16, 2024
596250d
drm/amd/display: Check gpio_id before used as array index
Apr 16, 2024
300a1ed
drm/amd/display: Stop amdgpu_dm initialize when stream nums greater t…
Apr 24, 2024
ae3261b
drm/amd/display: Check index for aux_rd_interval before using
Apr 19, 2024
1c1c8a7
drm/amd/display: Add array index check for hdcp ddc access
Apr 24, 2024
51f1140
drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[]
Apr 16, 2024
f0682be
drm/amd/display: Check msg_id before processing transcation
Apr 16, 2024
d30b3a2
drm/amd/display: Fix Coverity INTERGER_OVERFLOW within construct_inte…
Apr 26, 2024
4a7f660
drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_servic…
Apr 26, 2024
376f4b4
drm/amd/display: Spinlock before reading event
Apr 26, 2024
0e06cb1
drm/amd/display: Fix Coverity INTEGER_OVERFLOW within decide_fallback…
Apr 26, 2024
d94bb3d
drm/amd/display: Ensure index calculation will not overflow
Apr 24, 2024
645c8e0
drm/amd/display: Skip inactive planes within ModeSupportAndSystemConf…
Apr 26, 2024
2b9372b
drm/amd/display: Fix index may exceed array range within fpu_update_b…
Apr 25, 2024
13c344c
drm/amd/amdgpu: Check tbo resource pointer
Apr 25, 2024
ab31c63
drm/amd/pm: fix uninitialized variable warnings for vangogh_ppt
Apr 28, 2024
32dc49e
drm/amdgpu/pm: Fix uninitialized variable warning for smu10
Apr 26, 2024
dbfb674
drm/amdgpu/pm: Fix uninitialized variable agc_btc_response
Apr 28, 2024
7a98c0d
drm/amdgpu: Fix the uninitialized variable warning
Apr 24, 2024
f2d4216
drm/amdgpu: Fix out-of-bounds write warning
Apr 25, 2024
3c49bec
drm/amdkfd: Check debug trap enable before write dbg_ev_file
Apr 24, 2024
4744843
drm/amdgpu: Fix out-of-bounds read of df_v1_7_channel_number
May 7, 2024
569e32b
drm/amdgpu: fix ucode out-of-bounds read warning
May 6, 2024
a647118
drm/amdgpu: fix mc_data out-of-bounds read warning
May 6, 2024
d75bcbf
drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_…
michchen-amd May 3, 2024
38e8957
apparmor: fix possible NULL pointer dereference
lsahn-gh May 7, 2024
734eba2
wifi: ath12k: initialize 'ret' in ath12k_qmi_load_file_target_mem()
May 4, 2024
fa9afbb
wifi: ath11k: initialize 'ret' in ath11k_qmi_load_file_target_mem()
May 4, 2024
87eef52
drm/amdgpu/pm: Check input value for CUSTOM profile mode setting on l…
May 10, 2024
9915e5b
drm/amdgpu: Fix the warning division or modulo by zero
Jie1zhang May 10, 2024
0f3276d
drm/amdgpu: fix dereference after null check
Jie1zhang May 8, 2024
1aca152
drm/amdgpu: fix the waring dereferencing hive
Jie1zhang May 8, 2024
dc0c27e
drm/amd/pm: check specific index for aldebaran
Jie1zhang May 8, 2024
7d6b35a
drm/amd/pm: check specific index for smu13
Jie1zhang May 8, 2024
e65c2a8
drm/amdgpu: the warning dereferencing obj for nbio_v7_4
Jie1zhang May 13, 2024
690cefd
drm/amd/pm: check negtive return for table entries
Jie1zhang May 13, 2024
80a76e7
wifi: rtw89: ser: avoid multiple deinit on same CAM
May 9, 2024
8724fcd
drm/kfd: Correct pinned buffer handling at kfd restore and validate p…
May 14, 2024
3604fe5
drm/amdgpu: update type of buf size to u32 for eeprom functions
May 17, 2024
6316fc1
wifi: iwlwifi: remove fw_running op
May 10, 2024
91c9a51
cpufreq: scmi: Avoid overflow of target_freq in fast switch
May 20, 2024
e164b2d
PCI: al: Check IORESOURCE_BUS existence during probe
May 3, 2024
7fd0514
wifi: mac80211: check ieee80211_bss_info_change_notify() against MLD
jmberg-intel May 23, 2024
f1ed15e
hwspinlock: Introduce hwspin_lock_bust()
May 29, 2024
859fbb6
soc: qcom: smem: Add qcom_smem_bust_hwspin_lock_by_host()
quic-clew May 29, 2024
e0c546c
RDMA/efa: Properly handle unexpected AQ completions
mrgolin May 13, 2024
fe0fb0d
ionic: fix potential irq name truncation
emusln May 29, 2024
b4f0dca
pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode.
ksloatdesignlinx Dec 15, 2022
9990fca
rcu/nocb: Remove buggy bypass lock contention mitigation
Apr 25, 2024
febeadb
media: v4l2-cci: Always assign *val
May 28, 2024
5651561
usbip: Don't submit special requests twice
holesch May 19, 2024
b35fdbc
usb: typec: ucsi: Fix null pointer dereference in trace
apandit May 10, 2024
73b9964
fsnotify: clear PARENT_WATCHED flags lazily
amir73il May 12, 2024
1e79574
net: remove NULL-pointer net parameter in ip_metrics_convert
JasonXing May 31, 2024
9e0ed26
drm/amdgu: fix Unintentional integer overflow for mall size
Jie1zhang May 29, 2024
bb061b6
regmap: spi: Fix potential off-by-one when calculating reserved size
andy-shev Jun 5, 2024
a806713
smack: tcp: ipv4, fix incorrect labeling
cschaufler Jun 5, 2024
4fc1de2
platform/chrome: cros_ec_lpc: MEC access can use an AML mutex
walshb Jun 5, 2024
33a4850
net/mlx5e: SHAMPO, Fix incorrect page release
dtatulea Jun 3, 2024
7c781c6
drm/meson: plane: Add error handling
Nov 29, 2023
f6ef4a6
crypto: stm32/cryp - call finalize with bh disabled
meremST May 28, 2024
0010aab
gfs2: Revert "Add quota_change type"
Jun 5, 2024
4649c95
drm/bridge: tc358767: Check if fully initialized before signalling HP…
May 31, 2024
ea302b5
dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while i…
Jun 8, 2024
2eda051
dmaengine: altera-msgdma: properly free descriptor in msgdma_free_des…
Jun 8, 2024
d693d4a
hwmon: (k10temp) Check return value of amd_smn_read()
yghannam Jun 6, 2024
183c2a6
wifi: cfg80211: make hash table duplicates more survivable
jmberg-intel Jun 7, 2024
da3d2f4
f2fs: fix to do sanity check on blocks for inline_data inode
chaseyu May 21, 2024
fa8b5a6
driver: iio: add missing checks on iio_info's callback access
justeph May 30, 2024
1ac3731
block: remove the blk_flush_integrity call in blk_integrity_unregister
Jun 13, 2024
0f2c231
drm/amdgpu: add skip_hw_access checks for sriov
yunxiali May 24, 2024
5e6035f
drm/amdgpu: add lock in amdgpu_gart_invalidate_tlb
yunxiali May 24, 2024
fdc6438
drm/amdgpu: add lock in kfd_process_dequeue_from_device
yunxiali Jun 3, 2024
25f3d6a
drm/amd/display: Don't use fsleep for PSR exit waits on dmub replay
Sep 27, 2023
aae2896
drm/amd/display: added NULL check at start of dc_validate_stream
May 27, 2024
3745556
drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATI…
May 27, 2024
2a5ef23
drm/amd/display: use preferred link settings for dp signal only
May 29, 2024
5292d4b
drm/amd/display: Check BIOS images before it is used
Jun 3, 2024
61a15e9
drm/amd/display: Skip wbscl_set_scaler_filter if filter is null
Jun 3, 2024
5579708
media: uvcvideo: Enforce alignment of frame and interval
ribalda Apr 4, 2024
8ef5275
virtio_net: Fix napi_skb_cache_put warning
leitao Jul 12, 2024
a5ef42f
i2c: Use IS_REACHABLE() for substituting empty ACPI functions
rfvirgil Aug 14, 2024
bbc4d03
Linux 6.6.50
gregkh Sep 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Documentation/locking/hwspinlock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ is already free).

Should be called from a process context (might sleep).

::

int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id);

After verifying the owner of the hwspinlock, release a previously acquired
hwspinlock; returns 0 on success, or an appropriate error code on failure
(e.g. -EOPNOTSUPP if the bust operation is not defined for the specific
hwspinlock).

Should be called from a process context (might sleep).

::

int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int timeout);
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 49
SUBLEVEL = 50
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
2 changes: 0 additions & 2 deletions block/blk-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ void blk_integrity_unregister(struct gendisk *disk)
if (!bi->profile)
return;

/* ensure all bios are off the integrity workqueue */
blk_flush_integrity();
blk_queue_flag_clear(QUEUE_FLAG_STABLE_WRITES, disk->queue);
memset(bi, 0, sizeof(*bi));
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/base/regmap/regmap-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ static const struct regmap_bus *regmap_get_spi_bus(struct spi_device *spi,
return ERR_PTR(-ENOMEM);

max_msg_size = spi_max_message_size(spi);
reg_reserve_size = config->reg_bits / BITS_PER_BYTE
+ config->pad_bits / BITS_PER_BYTE;
reg_reserve_size = (config->reg_bits + config->pad_bits) / BITS_PER_BYTE;
if (max_size + reg_reserve_size > max_msg_size)
max_size -= reg_reserve_size;

Expand Down
4 changes: 2 additions & 2 deletions drivers/cpufreq/scmi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy,
unsigned int target_freq)
{
struct scmi_data *priv = policy->driver_data;
unsigned long freq = target_freq;

if (!perf_ops->freq_set(ph, priv->domain_id,
target_freq * 1000, true))
if (!perf_ops->freq_set(ph, priv->domain_id, freq * 1000, true))
return target_freq;

return 0;
Expand Down
6 changes: 5 additions & 1 deletion drivers/crypto/stm32/stm32-cryp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <crypto/internal/des.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
#include <linux/bottom_half.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
Expand Down Expand Up @@ -1665,8 +1666,11 @@ static irqreturn_t stm32_cryp_irq_thread(int irq, void *arg)
it_mask &= ~IMSCR_OUT;
stm32_cryp_write(cryp, cryp->caps->imsc, it_mask);

if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out)
if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) {
local_bh_disable();
stm32_cryp_finish_req(cryp, 0);
local_bh_enable();
}

return IRQ_HANDLED;
}
Expand Down
9 changes: 4 additions & 5 deletions drivers/dma/altera-msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void msgdma_free_descriptor(struct msgdma_device *mdev,
struct msgdma_sw_desc *child, *next;

mdev->desc_free_cnt++;
list_add_tail(&desc->node, &mdev->free_list);
list_move_tail(&desc->node, &mdev->free_list);
list_for_each_entry_safe(child, next, &desc->tx_list, node) {
mdev->desc_free_cnt++;
list_move_tail(&child->node, &mdev->free_list);
Expand Down Expand Up @@ -583,17 +583,16 @@ static void msgdma_issue_pending(struct dma_chan *chan)
static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
{
struct msgdma_sw_desc *desc, *next;
unsigned long irqflags;

list_for_each_entry_safe(desc, next, &mdev->done_list, node) {
struct dmaengine_desc_callback cb;

list_del(&desc->node);

dmaengine_desc_get_callback(&desc->async_tx, &cb);
if (dmaengine_desc_callback_valid(&cb)) {
spin_unlock(&mdev->lock);
spin_unlock_irqrestore(&mdev->lock, irqflags);
dmaengine_desc_callback_invoke(&cb, NULL);
spin_lock(&mdev->lock);
spin_lock_irqsave(&mdev->lock, irqflags);
}

/* Run any dependencies, then free the descriptor */
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct amdgpu_afmt_acr amdgpu_afmt_acr(uint32_t clock)
amdgpu_afmt_calc_cts(clock, &res.cts_32khz, &res.n_32khz, 32000);
amdgpu_afmt_calc_cts(clock, &res.cts_44_1khz, &res.n_44_1khz, 44100);
amdgpu_afmt_calc_cts(clock, &res.cts_48khz, &res.n_48khz, 48000);
res.clock = clock;

return res;
}
9 changes: 5 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ static int amdgpu_amdkfd_bo_validate(struct amdgpu_bo *bo, uint32_t domain,
"Called with userptr BO"))
return -EINVAL;

/* bo has been pinned, not need validate it */
if (bo->tbo.pin_count)
return 0;

amdgpu_bo_placement_from_domain(bo, domain);

ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
Expand Down Expand Up @@ -2631,7 +2635,7 @@ static int confirm_valid_user_pages_locked(struct amdkfd_process_info *process_i

/* keep mem without hmm range at userptr_inval_list */
if (!mem->range)
continue;
continue;

/* Only check mem with hmm range associated */
valid = amdgpu_ttm_tt_get_user_pages_done(
Expand Down Expand Up @@ -2848,9 +2852,6 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence **ef)
if (!attachment->is_mapped)
continue;

if (attachment->bo_va->base.bo->tbo.pin_count)
continue;

kfd_mem_dmaunmap_attachment(mem, attachment);
ret = update_gpuvm_pte(mem, attachment, &sync_obj);
if (ret) {
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,8 @@ int amdgpu_atombios_init_mc_reg_table(struct amdgpu_device *adev,
(u32)le32_to_cpu(*((u32 *)reg_data + j));
j++;
} else if ((reg_table->mc_reg_address[i].pre_reg_data & LOW_NIBBLE_MASK) == DATA_EQU_PREV) {
if (i == 0)
continue;
reg_table->mc_reg_table_entry[num_ranges].mc_data[i] =
reg_table->mc_reg_table_entry[num_ranges].mc_data[i - 1];
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
struct amdgpu_firmware_info *ucode;

id = fw_type_convert(cgs_device, type);
if (id >= AMDGPU_UCODE_ID_MAXIMUM)
return -EINVAL;

ucode = &adev->firmware.ucode[id];
if (ucode->fw == NULL)
return -EINVAL;
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -4480,7 +4480,8 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
shadow = vmbo->shadow;

/* No need to recover an evicted BO */
if (shadow->tbo.resource->mem_type != TTM_PL_TT ||
if (!shadow->tbo.resource ||
shadow->tbo.resource->mem_type != TTM_PL_TT ||
shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET ||
shadow->parent->tbo.resource->mem_type != TTM_PL_VRAM)
continue;
Expand Down Expand Up @@ -5235,7 +5236,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
* to put adev in the 1st position.
*/
INIT_LIST_HEAD(&device_list);
if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1)) {
if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1) && hive) {
list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
list_add_tail(&tmp_adev->reset_list, &device_list);
if (gpu_reset_for_dev_remove && adev->shutdown)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ static int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
break;
case 2:
mall_size_per_umc = le32_to_cpu(mall_info->v2.mall_size_per_umc);
adev->gmc.mall_size = mall_size_per_umc * adev->gmc.num_umc;
adev->gmc.mall_size = (uint64_t)mall_size_per_umc * adev->gmc.num_umc;
break;
default:
dev_err(adev->dev,
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int __amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr,
* Returns the number of bytes read/written; -errno on error.
*/
static int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr,
u8 *eeprom_buf, u16 buf_size, bool read)
u8 *eeprom_buf, u32 buf_size, bool read)
{
const struct i2c_adapter_quirks *quirks = i2c_adap->quirks;
u16 limit;
Expand Down Expand Up @@ -225,15 +225,15 @@ static int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr,

int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap,
u32 eeprom_addr, u8 *eeprom_buf,
u16 bytes)
u32 bytes)
{
return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes,
true);
}

int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap,
u32 eeprom_addr, u8 *eeprom_buf,
u16 bytes)
u32 bytes)
{
return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes,
false);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap,
u32 eeprom_addr, u8 *eeprom_buf,
u16 bytes);
u32 bytes);

int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap,
u32 eeprom_addr, u8 *eeprom_buf,
u16 bytes);
u32 bytes);

#endif
6 changes: 5 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/set_memory.h>
#endif
#include "amdgpu.h"
#include "amdgpu_reset.h"
#include <drm/drm_drv.h>
#include <drm/ttm/ttm_tt.h>

Expand Down Expand Up @@ -400,7 +401,10 @@ void amdgpu_gart_invalidate_tlb(struct amdgpu_device *adev)
return;

mb();
amdgpu_device_flush_hdp(adev, NULL);
if (down_read_trylock(&adev->reset_domain->sem)) {
amdgpu_device_flush_hdp(adev, NULL);
up_read(&adev->reset_domain->sem);
}
for_each_set_bit(i, adev->vmhubs_mask, AMDGPU_MAX_VMHUBS)
amdgpu_gmc_flush_gpu_tlb(adev, 0, i, 0);
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,9 @@ static void psp_xgmi_reflect_topology_info(struct psp_context *psp,
uint8_t dst_num_links = node_info.num_links;

hive = amdgpu_get_xgmi_hive(psp->adev);
if (WARN_ON(!hive))
return;

list_for_each_entry(mirror_adev, &hive->device_list, gmc.xgmi.head) {
struct psp_xgmi_topology_info *mirror_top_info;
int j;
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
ring->max_dw = max_dw;
ring->hw_prio = hw_prio;

if (!ring->no_scheduler) {
if (!ring->no_scheduler && ring->funcs->type < AMDGPU_HW_IP_NUM) {
hw_ip = ring->funcs->type;
num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds;
adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] =
Expand Down Expand Up @@ -469,8 +469,9 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf,
size_t size, loff_t *pos)
{
struct amdgpu_ring *ring = file_inode(f)->i_private;
int r, i;
uint32_t value, result, early[3];
loff_t i;
int r;

if (*pos & 3 || size & 3)
return -EINVAL;
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
mutex_unlock(&psp->securedisplay_context.mutex);
break;
case 2:
if (size < 3 || phy_id >= TA_SECUREDISPLAY_MAX_PHY) {
dev_err(adev->dev, "Invalid input: %s\n", str);
return -EINVAL;
}
mutex_lock(&psp->securedisplay_context.mutex);
psp_prep_securedisplay_cmd_buf(psp, &securedisplay_cmd,
TA_SECUREDISPLAY_COMMAND__SEND_ROI_CRC);
Expand Down
11 changes: 10 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_device *adev)
vf2pf_info->dummy_page_addr = (uint64_t)adev->dummy_page_addr;
vf2pf_info->checksum =
amd_sriov_msg_checksum(
vf2pf_info, vf2pf_info->header.size, 0, 0);
vf2pf_info, sizeof(*vf2pf_info), 0, 0);

return 0;
}
Expand Down Expand Up @@ -998,6 +998,9 @@ static u32 amdgpu_virt_rlcg_reg_rw(struct amdgpu_device *adev, u32 offset, u32 v
return 0;
}

if (amdgpu_device_skip_hw_access(adev))
return 0;

reg_access_ctrl = &adev->gfx.rlc.reg_access_ctrl[xcc_id];
scratch_reg0 = (void __iomem *)adev->rmmio + 4 * reg_access_ctrl->scratch_reg0;
scratch_reg1 = (void __iomem *)adev->rmmio + 4 * reg_access_ctrl->scratch_reg1;
Expand Down Expand Up @@ -1073,6 +1076,9 @@ void amdgpu_sriov_wreg(struct amdgpu_device *adev,
{
u32 rlcg_flag;

if (amdgpu_device_skip_hw_access(adev))
return;

if (!amdgpu_sriov_runtime(adev) &&
amdgpu_virt_get_rlcg_reg_access_flag(adev, acc_flags, hwip, true, &rlcg_flag)) {
amdgpu_virt_rlcg_reg_rw(adev, offset, value, rlcg_flag, xcc_id);
Expand All @@ -1090,6 +1096,9 @@ u32 amdgpu_sriov_rreg(struct amdgpu_device *adev,
{
u32 rlcg_flag;

if (amdgpu_device_skip_hw_access(adev))
return 0;

if (!amdgpu_sriov_runtime(adev) &&
amdgpu_virt_get_rlcg_reg_access_flag(adev, acc_flags, hwip, false, &rlcg_flag))
return amdgpu_virt_rlcg_reg_rw(adev, offset, 0, rlcg_flag, xcc_id);
Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ static int aqua_vanjaram_switch_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr,

if (mode == AMDGPU_AUTO_COMPUTE_PARTITION_MODE) {
mode = __aqua_vanjaram_get_auto_mode(xcp_mgr);
if (mode == AMDGPU_UNKNOWN_COMPUTE_PARTITION_MODE) {
dev_err(adev->dev,
"Invalid config, no compatible compute partition mode found, available memory partitions: %d",
adev->gmc.num_mem_partitions);
return -EINVAL;
}
} else if (!__aqua_vanjaram_is_valid_mode(xcp_mgr, mode)) {
dev_err(adev->dev,
"Invalid compute partition mode requested, requested: %s, available memory partitions: %d",
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/df_v1_7.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ static u32 df_v1_7_get_hbm_channel_number(struct amdgpu_device *adev)
int fb_channel_number;

fb_channel_number = adev->df.funcs->get_fb_channel_number(adev);
if (fb_channel_number >= ARRAY_SIZE(df_v1_7_channel_number))
fb_channel_number = 0;

return df_v1_7_channel_number[fb_channel_number];
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static void nbio_v7_4_handle_ras_controller_intr_no_bifring(struct amdgpu_device
else
WREG32_SOC15(NBIO, 0, mmBIF_DOORBELL_INT_CNTL, bif_doorbell_intr_cntl);

if (!ras->disable_ras_err_cnt_harvest) {
if (ras && !ras->disable_ras_err_cnt_harvest && obj) {
/*
* clear error status after ras_controller_intr
* according to hw team and count ue number
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_crat.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
#define CRAT_OEMTABLEID_LENGTH 8
#define CRAT_RESERVED_LENGTH 6

#define CRAT_OEMID_64BIT_MASK ((1ULL << (CRAT_OEMID_LENGTH * 8)) - 1)

/* Compute Unit flags */
#define COMPUTE_UNIT_CPU (1 << 0) /* Create Virtual CRAT for CPU */
#define COMPUTE_UNIT_GPU (1 << 1) /* Create Virtual CRAT for GPU */
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ void debug_event_write_work_handler(struct work_struct *work)
struct kfd_process,
debug_event_workarea);

kernel_write(process->dbg_ev_file, &write_data, 1, &pos);
if (process->debug_trap_enabled && process->dbg_ev_file)
kernel_write(process->dbg_ev_file, &write_data, 1, &pos);
}

/* update process/device/queue exception status, write to descriptor
Expand Down Expand Up @@ -645,6 +646,7 @@ int kfd_dbg_trap_disable(struct kfd_process *target)
else if (target->runtime_info.runtime_state != DEBUG_RUNTIME_STATE_DISABLED)
target->runtime_info.runtime_state = DEBUG_RUNTIME_STATE_ENABLED;

cancel_work_sync(&target->debug_event_workarea);
fput(target->dbg_ev_file);
target->dbg_ev_file = NULL;

Expand Down
Loading
Loading