* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2026-11-13 16:07 Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-11-13 16:07 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Dave Airlie, David Rosca, DRI,
Linux Kernel Mailing List, Linux Next Mailing List,
Olivier Kaloudoff, Prike Liang
[-- Attachment #1: Type: text/plain, Size: 5882 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
between commits:
87a841d8c0b71 ("drm/amdgpu: Fix VCE buffer size check for DPB and input surface")
e23621a91bb59 ("drm/amdgpu/vce: don't allocate a scheduler fence in the direct IB test")
c3fed6272bb47 ("drm/amdgpu: guard VCE/UVD sched entity teardown on failed probe")
from the drm-fixes tree and commits:
98a9958c22deb ("drm/amdgpu: Allow VCE SEI command in IB")
24c0be8ac3ef2 ("drm/amdgpu: Fix VCE buffer size check for DPB and input surface")
b229fdd689c8b ("drm/amdgpu: Allow multiple VCE create commands with same handle")
5349075eac146 ("drm/amdgpu: Use feedback buffer for VCE destroy message")
995905389d93b ("drm/amdgpu/vce: don't allocate a scheduler fence in the direct IB test")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 11f8fe98aac46..e2cdd5a46aa24 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -559,7 +559,9 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
const unsigned int ib_size_dw = 1024;
struct amdgpu_job *job;
struct amdgpu_ib *ib;
+ struct amdgpu_ib ib_msg;
struct dma_fence *f = NULL;
+ uint64_t addr;
int i, r;
r = amdgpu_job_alloc_with_ib(ring->adev,
@@ -573,7 +575,17 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
if (r)
return r;
+ memset(&ib_msg, 0, sizeof(ib_msg));
+ /* only one gpu page is needed, alloc +1 page to make addr aligned. */
+ r = amdgpu_ib_get(ring->adev, NULL, AMDGPU_GPU_PAGE_SIZE * 2,
+ direct ? AMDGPU_IB_POOL_DIRECT : AMDGPU_IB_POOL_DELAYED,
+ &ib_msg);
+ if (r)
+ goto err;
+
ib = &job->ibs[0];
+ /* let addr point to page boundary */
+ addr = AMDGPU_GPU_PAGE_ALIGN(ib_msg.gpu_addr);
/* stitch together an VCE destroy msg */
ib->length_dw = 0;
@@ -587,9 +599,15 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
ib->ptr[ib->length_dw++] = 0x00000001; /* destroy session */
ib->ptr[ib->length_dw++] = 0x00000000;
ib->ptr[ib->length_dw++] = 0x00000000;
- ib->ptr[ib->length_dw++] = 0xffffffff; /* feedback is not needed, set to 0xffffffff and firmware will not output feedback */
+ ib->ptr[ib->length_dw++] = 0xffffffff;
ib->ptr[ib->length_dw++] = 0x00000000;
+ ib->ptr[ib->length_dw++] = 0x00000014; /* len */
+ ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
+ ib->ptr[ib->length_dw++] = upper_32_bits(addr);
+ ib->ptr[ib->length_dw++] = addr;
+ ib->ptr[ib->length_dw++] = 0x00000001;
+
ib->ptr[ib->length_dw++] = 0x00000008; /* len */
ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */
@@ -600,6 +618,7 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
r = amdgpu_job_submit_direct(job, ring, &f);
else
f = amdgpu_job_submit(job);
+ amdgpu_ib_free(&ib_msg, f);
if (r)
goto err;
@@ -771,6 +790,7 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
{
unsigned int fb_idx = 0, bs_idx = 0;
int session_idx = -1;
+ uint32_t img_size[AMDGPU_MAX_VCE_HANDLES];
uint32_t destroyed = 0;
uint32_t created = 0;
uint32_t allocated = 0;
@@ -862,7 +882,15 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
r = session_idx;
goto out;
}
- size = &p->adev->vce.img_size[session_idx];
+ /*
+ * Stage the image size locally and only commit it once
+ * the whole IB is valid, otherwise a failed create
+ * could change the size of a live session.
+ */
+ if (!(created & (1 << session_idx)))
+ img_size[session_idx] =
+ p->adev->vce.img_size[session_idx];
+ size = &img_size[session_idx];
break;
case 0x00000002: /* task info */
@@ -875,11 +903,6 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
if (destroyed & (1 << session_idx)) {
destroyed &= ~(1 << session_idx);
allocated |= 1 << session_idx;
-
- } else if (!(allocated & (1 << session_idx))) {
- DRM_ERROR("Handle already in use!\n");
- r = -EINVAL;
- goto out;
}
luma_pitch = amdgpu_ib_get_value(ib, idx + 8);
@@ -904,6 +927,7 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
case 0x04000007: /* motion estimation */
case 0x04000008: /* rdo */
case 0x04000009: /* vui */
+ case 0x0400000d: /* sei */
case 0x05000002: /* auxiliary buffer */
case 0x05000009: /* clock table */
break;
@@ -1006,7 +1030,12 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
out:
if (!r) {
- /* No error, free all destroyed handle slots */
+ /* No error, commit the image size of created sessions */
+ for (i = 0; i < AMDGPU_MAX_VCE_HANDLES; ++i)
+ if (created & (1 << i))
+ p->adev->vce.img_size[i] = img_size[i];
+
+ /* and free all destroyed handle slots */
tmp = destroyed;
} else {
/* Error during parsing, free all allocated handle slots */
@@ -1064,11 +1093,6 @@ int amdgpu_vce_ring_parse_cs_vm(struct amdgpu_cs_parser *p,
if (destroyed & (1 << session_idx)) {
destroyed &= ~(1 << session_idx);
allocated |= 1 << session_idx;
-
- } else if (!(allocated & (1 << session_idx))) {
- DRM_ERROR("Handle already in use!\n");
- r = -EINVAL;
- goto out;
}
break;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2026-09-18 11:49 Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-09-18 11:49 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
Mario Limonciello
[-- Attachment #1: Type: text/plain, Size: 5142 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
between commit:
04de4007d3238 ("drm/amdgpu: Fix GPU PCIe link capability reporting")
from the drm-fixes tree and commits:
7ea6a47224e2c ("drm/amdgpu: Fix GPU PCIe link capability reporting")
15b2b06744561 ("drm/amdgpu: Reuse cached PCIe link device")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index cf39db90dfe0a,dcf72ff438889..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@@ -68,6 -68,7 +68,7 @@@
#include "amdgpu_vf_error.h"
#include "amdgpu_amdkfd.h"
+ #include "amdgpu_ip.h"
#include "amdgpu_pm.h"
#include "amdgpu_xgmi.h"
@@@ -1353,31 -1354,6 +1354,6 @@@ static bool amdgpu_device_aspm_support_
#endif
}
- /*
- * Some dGPUs expose their display endpoint below an internal PCIe switch.
- * Use the switch upstream port to query the host-facing link.
- */
- static struct pci_dev *amdgpu_device_get_aspm_pdev(struct amdgpu_device *adev)
- {
- struct pci_dev *swds, *swus;
-
- swds = pci_upstream_bridge(adev->pdev);
- if (!swds ||
- (swds->vendor != PCI_VENDOR_ID_ATI &&
- swds->vendor != PCI_VENDOR_ID_AMD) ||
- pci_pcie_type(swds) != PCI_EXP_TYPE_DOWNSTREAM)
- return adev->pdev;
-
- swus = pci_upstream_bridge(swds);
- if (!swus ||
- (swus->vendor != PCI_VENDOR_ID_ATI &&
- swus->vendor != PCI_VENDOR_ID_AMD) ||
- pci_pcie_type(swus) != PCI_EXP_TYPE_UPSTREAM)
- return adev->pdev;
-
- return swus;
- }
-
/**
* amdgpu_device_should_use_aspm - check if the device should program ASPM
*
@@@ -1413,7 -1389,7 +1389,7 @@@ bool amdgpu_device_should_use_aspm(stru
* the immediate upstream bridge. Use SWUS for dGPUs with an
* internal switch so that this is the host-facing link.
*/
- aspm_pdev = amdgpu_device_get_aspm_pdev(adev);
+ aspm_pdev = adev->link_dev;
parent = pci_upstream_bridge(aspm_pdev);
if (!parent) {
dev_dbg(adev->dev, "ASPM: no upstream PCIe link for %s\n",
@@@ -1739,17 -1715,10 +1715,17 @@@ static bool amdgpu_switcheroo_can_switc
return atomic_read(&dev->open_count) == 0;
}
+static void amdgpu_switcheroo_pre_switch(struct pci_dev *pdev)
+{
+ struct drm_device *dev = pci_get_drvdata(pdev);
+
+ drm_client_dev_acquire_outputs(dev);
+}
+
static const struct vga_switcheroo_client_ops amdgpu_switcheroo_ops = {
.set_gpu_state = amdgpu_switcheroo_set_state,
- .reprobe = NULL,
.can_switch = amdgpu_switcheroo_can_switch,
+ .pre_switch = amdgpu_switcheroo_pre_switch,
};
/**
@@@ -1968,15 -1937,26 +1944,26 @@@ static void amdgpu_uid_fini(struct amdg
static void amdgpu_device_init_pcie_links(struct amdgpu_device *adev)
{
+ struct pci_dev *swds, *swus;
+
adev->link_dev = adev->pdev;
adev->link_partner = pci_upstream_bridge(adev->link_dev);
- /* Skip upstream/downstream switches internal to the dGPU. */
- while (adev->link_partner &&
- adev->link_partner->vendor == PCI_VENDOR_ID_ATI) {
- adev->link_dev = adev->link_partner;
- adev->link_partner = pci_upstream_bridge(adev->link_dev);
- }
+ /* Skip an upstream/downstream switch internal to the dGPU. */
+ swds = adev->link_partner;
+ if (!swds || swds->vendor != PCI_VENDOR_ID_ATI ||
+ pci_pcie_type(swds) != PCI_EXP_TYPE_DOWNSTREAM)
+ return;
+
+ swus = pci_upstream_bridge(swds);
+ if (!swus ||
+ (swus->vendor != PCI_VENDOR_ID_ATI &&
+ swus->vendor != PCI_VENDOR_ID_AMD) ||
+ pci_pcie_type(swus) != PCI_EXP_TYPE_UPSTREAM)
+ return;
+
+ adev->link_dev = swus;
+ adev->link_partner = pci_upstream_bridge(swus);
}
/**
@@@ -3855,6 -3835,7 +3842,7 @@@ int amdgpu_device_init(struct amdgpu_de
spin_lock_init(&adev->irq.lock);
+ amdgpu_ip_map_init(adev);
amdgpu_early_init_rlc_reg_funcs(adev);
amdgpu_device_init_apu_flags(adev);
@@@ -6434,16 -6415,10 +6422,10 @@@ static void amdgpu_device_cache_switch_
struct pci_dev *swus, *swds;
int r;
+ swus = adev->link_dev != adev->pdev ? adev->link_dev : NULL;
+ if (!swus)
+ return;
swds = pci_upstream_bridge(adev->pdev);
- if (!swds || swds->vendor != PCI_VENDOR_ID_ATI ||
- pci_pcie_type(swds) != PCI_EXP_TYPE_DOWNSTREAM)
- return;
- swus = pci_upstream_bridge(swds);
- if (!swus ||
- (swus->vendor != PCI_VENDOR_ID_ATI &&
- swus->vendor != PCI_VENDOR_ID_AMD) ||
- pci_pcie_type(swus) != PCI_EXP_TYPE_UPSTREAM)
- return;
/* If already saved, return */
if (adev->pcie_reset_ctx.swus)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2026-06-08 11:29 Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-06-08 11:29 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Christian König, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
between commit:
40396ffdf6120 ("drm/amdgpu: restart the CS if some parts of the VM are still invalidated")
from the drm-fixes tree and commit:
59720bfd8c6db ("drm/amdgpu: restart the CS if some parts of the VM are still invalidated")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 548a4f14a9f81,fc071efd4c255..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@@ -60,11 -60,6 +60,6 @@@ static int amdgpu_cs_parser_init(struc
if (!p->ctx)
return -EINVAL;
- if (atomic_read(&p->ctx->guilty)) {
- amdgpu_ctx_put(p->ctx);
- return -ECANCELED;
- }
-
amdgpu_sync_create(&p->sync);
drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
DRM_EXEC_IGNORE_DUPLICATES, 0);
@@@ -850,6 -845,7 +845,6 @@@ static int amdgpu_cs_parser_bos(struct
struct amdgpu_vm *vm = &fpriv->vm;
struct amdgpu_bo_list_entry *e;
struct drm_gem_object *obj;
- unsigned long index;
unsigned int i;
int r;
@@@ -960,7 -956,7 +955,7 @@@
goto out_free_user_pages;
}
- drm_exec_for_each_locked_object(&p->exec, index, obj) {
+ drm_exec_for_each_locked_object(&p->exec, obj) {
r = amdgpu_cs_bo_validate(p, gem_to_amdgpu_bo(obj));
if (unlikely(r))
goto out_free_user_pages;
@@@ -1157,7 -1153,7 +1152,7 @@@ static int amdgpu_cs_vm_handling(struc
return r;
}
- r = amdgpu_vm_handle_moved(adev, vm, &p->exec.ticket);
+ r = amdgpu_vm_handle_moved(adev, vm, drm_exec_ticket(&p->exec));
if (r)
return r;
@@@ -1200,6 -1196,7 +1195,6 @@@ static int amdgpu_cs_sync_rings(struct
struct drm_gpu_scheduler *sched;
struct drm_gem_object *obj;
struct dma_fence *fence;
- unsigned long index;
unsigned int i;
int r;
@@@ -1210,7 -1207,7 +1205,7 @@@
return r;
}
- drm_exec_for_each_locked_object(&p->exec, index, obj) {
+ drm_exec_for_each_locked_object(&p->exec, obj) {
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
struct dma_resv *resv = bo->tbo.base.resv;
@@@ -1280,6 -1277,7 +1275,6 @@@ static int amdgpu_cs_submit(struct amdg
struct amdgpu_vm *vm = &fpriv->vm;
struct amdgpu_bo_list_entry *e;
struct drm_gem_object *gobj;
- unsigned long index;
unsigned int i;
uint64_t seq;
int r;
@@@ -1323,14 -1321,14 +1318,14 @@@
e->range = NULL;
}
- if (r || !list_empty(&vm->invalidated)) {
+ if (r || !list_empty(&vm->individual.moved)) {
r = -EAGAIN;
mutex_unlock(&p->adev->notifier_lock);
return r;
}
p->fence = dma_fence_get(&leader->base.s_fence->finished);
- drm_exec_for_each_locked_object(&p->exec, index, gobj) {
+ drm_exec_for_each_locked_object(&p->exec, gobj) {
ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo);
@@@ -1361,7 -1359,7 +1356,7 @@@
cs->out.handle = seq;
leader->uf_sequence = seq;
- amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->exec.ticket);
+ amdgpu_vm_bo_trace_cs(&fpriv->vm, drm_exec_ticket(&p->exec));
for (i = 0; i < p->gang_size; ++i) {
amdgpu_job_free_resources(p->jobs[i]);
trace_amdgpu_cs_ioctl(p->jobs[i]);
@@@ -1796,7 -1794,7 +1791,7 @@@ int amdgpu_cs_find_mapping(struct amdgp
*map = mapping;
/* Double check that the BO is reserved by this CS */
- if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser->exec.ticket)
+ if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != drm_exec_ticket(&parser->exec))
return -EINVAL;
/* Make sure VRAM is allocated contigiously */
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2026-03-05 13:37 Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-03-05 13:37 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
Srinivasan Shanmugam, Sunil Khatri
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
between commits:
65b5c326ce410 ("drm/amdgpu/userq: refcount userqueues to avoid any race conditions")
64ac7c09fc449 ("drm/amdgpu: add upper bound check on user inputs in wait ioctl")
from the drm-fixes tree and commits:
750cbc4fbd490 ("drm/amdgpu: Drop redundant syncobj handle limit checks in userq ioctls")
4952189b284d4 ("drm/amdgpu/userq: refcount userqueues to avoid any race conditions")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 5239b06b9ab03,d8ce7b3733e75..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2026-02-27 14:00 Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-02-27 14:00 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
Sunil Khatri, Tvrtko Ursulin
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
between commit:
64ac7c09fc449 ("drm/amdgpu: add upper bound check on user inputs in wait ioctl")
from the drm-fixes tree and commits:
fcec012c66424 ("drm/amdgpu: add upper bound check on user inputs in wait ioctl")
4ca06f6fb45da ("drm/amdgpu/userq: Use drm_gem_objects_lookup in amdgpu_userq_signal_ioctl")
2de9353e193fd ("drm/amdgpu/userq: Use drm_gem_objects_lookup in amdgpu_userq_wait_ioctl")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 7e9cf1868cc9f,844c2db35e4a1..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: manual merge of the amdgpu tree with the drm-fixes tree
2021-07-23 2:58 Stephen Rothwell
@ 2021-07-23 3:08 ` Stephen Rothwell
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2021-07-23 3:08 UTC (permalink / raw)
To: Alex Deucher, Dave Airlie, DRI
Cc: Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
Stylon Wang
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
Hi all,
On Fri, 23 Jul 2021 12:58:07 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> + #ifdef CONFIG_DRM_AMD_DC_HDCP
> + if (cp_psp && cp_psp->funcs.enable_assr) {
> + if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
> + /* since eDP implies ASSR on, change panel
> + * mode to disable ASSR
> + */
> + panel_mode = DP_PANEL_MODE_DEFAULT;
> + }
> - } else
> - panel_mode = DP_PANEL_MODE_DEFAULT;
> + #endif
I corrected that to put back just the closing '}'.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the amdgpu tree with the drm-fixes tree
@ 2021-07-23 2:58 Stephen Rothwell
2021-07-23 3:08 ` Stephen Rothwell
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2021-07-23 2:58 UTC (permalink / raw)
To: Alex Deucher, Dave Airlie, DRI
Cc: Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
Stylon Wang
[-- Attachment #1: Type: text/plain, Size: 2230 bytes --]
Hi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
between commit:
6be50f5d83ad ("drm/amd/display: Fix ASSR regression on embedded panels")
from the drm-fixes tree and commit:
fb85f280bf40 ("drm/amd/display: Re-enable "Guard ASSR with internal display flag"")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 9fb8c46dc606,036a87af6c5b..000000000000
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@@ -1761,6 -1752,38 +1752,36 @@@ enum link_training_result dc_link_dp_pe
return status;
}
+ static enum dp_panel_mode try_enable_assr(struct dc_stream_state *stream)
+ {
+ struct dc_link *link = stream->link;
+ enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
+ #ifdef CONFIG_DRM_AMD_DC_HDCP
+ struct cp_psp *cp_psp = &stream->ctx->cp_psp;
+ #endif
+
+ /* ASSR must be supported on the panel */
+ if (panel_mode == DP_PANEL_MODE_DEFAULT)
+ return panel_mode;
+
+ /* eDP or internal DP only */
+ if (link->connector_signal != SIGNAL_TYPE_EDP &&
+ !(link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
+ link->is_internal_display))
+ return DP_PANEL_MODE_DEFAULT;
+
+ #ifdef CONFIG_DRM_AMD_DC_HDCP
+ if (cp_psp && cp_psp->funcs.enable_assr) {
+ if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
+ /* since eDP implies ASSR on, change panel
+ * mode to disable ASSR
+ */
+ panel_mode = DP_PANEL_MODE_DEFAULT;
+ }
- } else
- panel_mode = DP_PANEL_MODE_DEFAULT;
+ #endif
+ return panel_mode;
+ }
+
bool perform_link_training_with_retries(
const struct dc_link_settings *link_setting,
bool skip_video_pattern,
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-13 16:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 16:07 linux-next: manual merge of the amdgpu tree with the drm-fixes tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2026-09-18 11:49 Mark Brown
2026-06-08 11:29 Mark Brown
2026-03-05 13:37 Mark Brown
2026-02-27 14:00 Mark Brown
2021-07-23 2:58 Stephen Rothwell
2021-07-23 3:08 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®