mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 06:17:27 +02:00
drm-misc-next for 7.3:
UAPI Changes: Cross-subsystem Changes: Core Changes: - bridge: Add atomic_create_state callback and helpers, drop atomic_reset - dp: Add support for DSC max delta BPP - edid: Parse panel type from DisplayID 2.x Display Parameters - sysfb: Improve panel, stride and framebuffer size validation Driver Changes: - hibmc: Improvements to the plane formats handling, switch to gem-shmem - nouveau: race fixes, misc improvements - bridges: - Convert all bridges to atomic_create_state - panels: - panel-edp: New quirks for BOE NE160QDM-NY1, MB116AS01 -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCakYLBQAKCRAnX84Zoj2+ du3xAYDaeJMk4mW1YryP7WUwoPMao4qRl+wXD8hrxPD0OTzlznJ2DhEZ5URaSMDN SmejA20Bf3z5wWMnkuKo/44rdYmcvytBBa9lwkgdiUkSk7t9lmrKr1Vz7V3xyWFE Vw0FTDSyxw== =7zUE -----END PGP SIGNATURE----- Merge tag 'drm-misc-next-2026-07-02' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 7.3: UAPI Changes: Cross-subsystem Changes: Core Changes: - bridge: Add atomic_create_state callback and helpers, drop atomic_reset - dp: Add support for DSC max delta BPP - edid: Parse panel type from DisplayID 2.x Display Parameters - sysfb: Improve panel, stride and framebuffer size validation Driver Changes: - hibmc: Improvements to the plane formats handling, switch to gem-shmem - nouveau: race fixes, misc improvements - bridges: - Convert all bridges to atomic_create_state - panels: - panel-edp: New quirks for BOE NE160QDM-NY1, MB116AS01 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patch.msgid.link/20260702-powerful-successful-raptor-eded34@houat
This commit is contained in:
commit
26934ed848
1
.mailmap
1
.mailmap
|
|
@ -559,6 +559,7 @@ Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com> <martyna.szapar-mu
|
|||
Mathieu Othacehe <othacehe@gnu.org> <m.othacehe@gmail.com>
|
||||
Mat Martineau <martineau@kernel.org> <mathew.j.martineau@linux.intel.com>
|
||||
Mat Martineau <martineau@kernel.org> <mathewm@codeaurora.org>
|
||||
Matt Coster <opensource@mtcoster.net> <matt.coster@imgtec.com>
|
||||
Matthew Wilcox <willy@infradead.org> <matthew.r.wilcox@intel.com>
|
||||
Matthew Wilcox <willy@infradead.org> <matthew@wil.cx>
|
||||
Matthew Wilcox <willy@infradead.org> <mawilcox@linuxonhyperv.com>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Imagination Technologies PowerVR and IMG Rogue GPUs
|
||||
|
||||
maintainers:
|
||||
- Frank Binns <frank.binns@imgtec.com>
|
||||
- Alessio Belle <alessio.belle@imgtec.com>
|
||||
- Luigi Santivetti <luigi.santivetti@imgtec.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Imagination Technologies PowerVR SGX GPUs
|
||||
|
||||
maintainers:
|
||||
- Frank Binns <frank.binns@imgtec.com>
|
||||
- Alessio Belle <alessio.belle@imgtec.com>
|
||||
- Luigi Santivetti <luigi.santivetti@imgtec.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
|
|
|||
|
|
@ -896,10 +896,11 @@ complection of submission.
|
|||
One minor feature still missing is a generic DRM IOCTL to query the error
|
||||
status of binary and timeline drm_syncobj.
|
||||
|
||||
This should probably be improved by implementing the necessary kernel interface
|
||||
and adding support for that in the userspace stack.
|
||||
This was already improved by implementing the necessary kernel interface
|
||||
(patches are on the dri-devel mailing list) but adding support for that in the
|
||||
userspace stack is still missing.
|
||||
|
||||
Contact: Christian König
|
||||
Contact: Christian König, Michel Dänzer
|
||||
|
||||
Level: Starter
|
||||
|
||||
|
|
|
|||
11
MAINTAINERS
11
MAINTAINERS
|
|
@ -12670,12 +12670,15 @@ S: Orphan
|
|||
F: drivers/media/rc/img-ir/
|
||||
|
||||
IMGTEC POWERVR DRM DRIVER
|
||||
M: Frank Binns <frank.binns@imgtec.com>
|
||||
M: Matt Coster <matt.coster@imgtec.com>
|
||||
M: Alessio Belle <alessio.belle@imgtec.com>
|
||||
M: Luigi Santivetti <luigi.santivetti@imgtec.com>
|
||||
L: imagination@lists.freedesktop.org
|
||||
S: Supported
|
||||
Q: https://patchwork.freedesktop.org/project/imagination/list/
|
||||
B: https://gitlab.freedesktop.org/imagination/linux/-/issues
|
||||
C: irc://irc.oftc.net/powervr
|
||||
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
|
||||
F: Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
|
||||
F: Documentation/devicetree/bindings/gpu/img,powervr-sgx.yaml
|
||||
F: Documentation/devicetree/bindings/gpu/img,powervr-*.yaml
|
||||
F: Documentation/gpu/imagination/
|
||||
F: drivers/gpu/drm/ci/xfails/powervr*
|
||||
F: drivers/gpu/drm/imagination/
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
|
|||
|
||||
__dma_fence_might_wait();
|
||||
|
||||
dma_fence_enable_sw_signaling(fence);
|
||||
dma_fence_enable_signaling(fence);
|
||||
|
||||
rcu_read_lock();
|
||||
ops = rcu_dereference(fence->ops);
|
||||
|
|
@ -656,14 +656,14 @@ static bool __dma_fence_enable_signaling(struct dma_fence *fence)
|
|||
}
|
||||
|
||||
/**
|
||||
* dma_fence_enable_sw_signaling - enable signaling on fence
|
||||
* dma_fence_enable_signaling - enable signaling on fence
|
||||
* @fence: the fence to enable
|
||||
*
|
||||
* This will request for sw signaling to be enabled, to make the fence
|
||||
* complete as soon as possible. This calls &dma_fence_ops.enable_signaling
|
||||
* internally.
|
||||
*/
|
||||
void dma_fence_enable_sw_signaling(struct dma_fence *fence)
|
||||
void dma_fence_enable_signaling(struct dma_fence *fence)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
|
|
@ -671,7 +671,7 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
|
|||
__dma_fence_enable_signaling(fence);
|
||||
dma_fence_unlock_irqrestore(fence, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
|
||||
EXPORT_SYMBOL(dma_fence_enable_signaling);
|
||||
|
||||
/**
|
||||
* dma_fence_add_callback - add a callback to be called when the fence
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static void test_sanitycheck(struct kunit *test)
|
|||
|
||||
chain = mock_chain(NULL, f, 1);
|
||||
if (chain)
|
||||
dma_fence_enable_sw_signaling(chain);
|
||||
dma_fence_enable_signaling(chain);
|
||||
else
|
||||
KUNIT_FAIL(test, "Failed to create chain");
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ static int fence_chains_init(struct fence_chains *fc, unsigned int count,
|
|||
|
||||
fc->tail = fc->chains[i];
|
||||
|
||||
dma_fence_enable_sw_signaling(fc->chains[i]);
|
||||
dma_fence_enable_signaling(fc->chains[i]);
|
||||
}
|
||||
|
||||
fc->chain_length = i;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ static void test_sanitycheck(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
array = mock_array(1, f);
|
||||
KUNIT_ASSERT_NOT_NULL(test, array);
|
||||
|
|
@ -122,7 +122,7 @@ static void test_unwrap_array(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -131,7 +131,7 @@ static void test_unwrap_array(struct kunit *test)
|
|||
return;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
array = mock_array(2, f1, f2);
|
||||
KUNIT_ASSERT_NOT_NULL(test, array);
|
||||
|
|
@ -160,7 +160,7 @@ static void test_unwrap_chain(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -169,7 +169,7 @@ static void test_unwrap_chain(struct kunit *test)
|
|||
return;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
chain = mock_chain(f1, f2);
|
||||
KUNIT_ASSERT_NOT_NULL(test, chain);
|
||||
|
|
@ -198,7 +198,7 @@ static void test_unwrap_chain_array(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -207,7 +207,7 @@ static void test_unwrap_chain_array(struct kunit *test)
|
|||
return;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
array = mock_array(2, f1, f2);
|
||||
KUNIT_ASSERT_NOT_NULL(test, array);
|
||||
|
|
@ -239,7 +239,7 @@ static void test_unwrap_merge(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -247,7 +247,7 @@ static void test_unwrap_merge(struct kunit *test)
|
|||
goto error_put_f1;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
f3 = dma_fence_unwrap_merge(f1, f2);
|
||||
if (!f3) {
|
||||
|
|
@ -285,7 +285,7 @@ static void test_unwrap_merge_duplicate(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = dma_fence_unwrap_merge(f1, f1);
|
||||
if (!f2) {
|
||||
|
|
@ -322,7 +322,7 @@ static void test_unwrap_merge_seqno(struct kunit *test)
|
|||
f1 = __mock_fence(ctx[1], 1);
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = __mock_fence(ctx[1], 2);
|
||||
if (!f2) {
|
||||
|
|
@ -330,7 +330,7 @@ static void test_unwrap_merge_seqno(struct kunit *test)
|
|||
goto error_put_f1;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
f3 = __mock_fence(ctx[0], 1);
|
||||
if (!f3) {
|
||||
|
|
@ -338,7 +338,7 @@ static void test_unwrap_merge_seqno(struct kunit *test)
|
|||
goto error_put_f2;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f3);
|
||||
dma_fence_enable_signaling(f3);
|
||||
|
||||
f4 = dma_fence_unwrap_merge(f1, f2, f3);
|
||||
if (!f4) {
|
||||
|
|
@ -378,7 +378,7 @@ static void test_unwrap_merge_order(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -387,7 +387,7 @@ static void test_unwrap_merge_order(struct kunit *test)
|
|||
return;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
a1 = mock_array(2, f1, f2);
|
||||
KUNIT_ASSERT_NOT_NULL(test, a1);
|
||||
|
|
@ -442,7 +442,7 @@ static void test_unwrap_merge_complex(struct kunit *test)
|
|||
f1 = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = mock_fence();
|
||||
if (!f2) {
|
||||
|
|
@ -450,7 +450,7 @@ static void test_unwrap_merge_complex(struct kunit *test)
|
|||
goto error_put_f1;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
f3 = dma_fence_unwrap_merge(f1, f2);
|
||||
if (!f3) {
|
||||
|
|
@ -510,7 +510,7 @@ static void test_unwrap_merge_complex_seqno(struct kunit *test)
|
|||
f1 = __mock_fence(ctx[0], 2);
|
||||
KUNIT_ASSERT_NOT_NULL(test, f1);
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
f2 = __mock_fence(ctx[1], 1);
|
||||
if (!f2) {
|
||||
|
|
@ -518,7 +518,7 @@ static void test_unwrap_merge_complex_seqno(struct kunit *test)
|
|||
goto error_put_f1;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f2);
|
||||
dma_fence_enable_signaling(f2);
|
||||
|
||||
f3 = __mock_fence(ctx[0], 1);
|
||||
if (!f3) {
|
||||
|
|
@ -526,7 +526,7 @@ static void test_unwrap_merge_complex_seqno(struct kunit *test)
|
|||
goto error_put_f2;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f3);
|
||||
dma_fence_enable_signaling(f3);
|
||||
|
||||
f4 = __mock_fence(ctx[1], 2);
|
||||
if (!f4) {
|
||||
|
|
@ -534,7 +534,7 @@ static void test_unwrap_merge_complex_seqno(struct kunit *test)
|
|||
goto error_put_f3;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f4);
|
||||
dma_fence_enable_signaling(f4);
|
||||
|
||||
f5 = mock_array(2, dma_fence_get(f1), dma_fence_get(f2));
|
||||
if (!f5) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static void test_sanitycheck(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_fence_signal(f);
|
||||
dma_fence_put(f);
|
||||
|
|
@ -55,7 +55,7 @@ static void test_signaling(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
if (dma_fence_is_signaled(f)) {
|
||||
KUNIT_FAIL(test, "Fence unexpectedly signaled on creation");
|
||||
|
|
@ -127,7 +127,7 @@ static void test_late_add_callback(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_fence_signal(f);
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ static void test_status(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
if (dma_fence_get_status(f)) {
|
||||
KUNIT_FAIL(test, "Fence unexpectedly has signaled status on creation");
|
||||
|
|
@ -233,7 +233,7 @@ static void test_error(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_fence_set_error(f, -EIO);
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ static void test_wait(struct kunit *test)
|
|||
f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
if (dma_fence_wait_timeout(f, false, 0) != 0) {
|
||||
KUNIT_FAIL(test, "Wait reported complete before being signaled");
|
||||
|
|
@ -300,7 +300,7 @@ static void test_wait_timeout(struct kunit *test)
|
|||
wt.f = mock_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, wt.f);
|
||||
|
||||
dma_fence_enable_sw_signaling(wt.f);
|
||||
dma_fence_enable_signaling(wt.f);
|
||||
|
||||
if (dma_fence_wait_timeout(wt.f, false, 1) != 0) {
|
||||
KUNIT_FAIL(test, "Wait reported complete before being signaled");
|
||||
|
|
@ -379,7 +379,7 @@ static int thread_signal_callback(void *arg)
|
|||
break;
|
||||
}
|
||||
|
||||
dma_fence_enable_sw_signaling(f1);
|
||||
dma_fence_enable_signaling(f1);
|
||||
|
||||
rcu_assign_pointer(t->fences[t->id], f1);
|
||||
smp_wmb();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static void test_sanitycheck(struct kunit *test)
|
|||
f = alloc_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_fence_signal(f);
|
||||
dma_fence_put(f);
|
||||
|
|
@ -73,7 +73,7 @@ static void test_signaling(struct kunit *test)
|
|||
f = alloc_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_resv_init(&resv);
|
||||
r = dma_resv_lock(&resv, NULL);
|
||||
|
|
@ -117,7 +117,7 @@ static void test_for_each(struct kunit *test)
|
|||
f = alloc_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_resv_init(&resv);
|
||||
r = dma_resv_lock(&resv, NULL);
|
||||
|
|
@ -176,7 +176,7 @@ static void test_for_each_unlocked(struct kunit *test)
|
|||
f = alloc_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_resv_init(&resv);
|
||||
r = dma_resv_lock(&resv, NULL);
|
||||
|
|
@ -246,7 +246,7 @@ static void test_get_fences(struct kunit *test)
|
|||
f = alloc_fence();
|
||||
KUNIT_ASSERT_NOT_NULL(test, f);
|
||||
|
||||
dma_fence_enable_sw_signaling(f);
|
||||
dma_fence_enable_signaling(f);
|
||||
|
||||
dma_resv_init(&resv);
|
||||
r = dma_resv_lock(&resv, NULL);
|
||||
|
|
|
|||
|
|
@ -187,32 +187,20 @@ config SYSFB
|
|||
select SCREEN_INFO
|
||||
|
||||
config SYSFB_SIMPLEFB
|
||||
bool "Mark VGA/VBE/EFI FB as generic system framebuffer"
|
||||
bool "Mark VGA/VBE/EFI FB as generic system framebuffer (deprecated)"
|
||||
depends on X86 || EFI
|
||||
select SYSFB
|
||||
help
|
||||
Firmwares often provide initial graphics framebuffers so the BIOS,
|
||||
Firmware often provides initial graphics framebuffers so the BIOS,
|
||||
bootloader or kernel can show basic video-output during boot for
|
||||
user-guidance and debugging. Historically, x86 used the VESA BIOS
|
||||
Extensions and EFI-framebuffers for this, which are mostly limited
|
||||
to x86 BIOS or EFI systems.
|
||||
This option, if enabled, marks VGA/VBE/EFI framebuffers as generic
|
||||
framebuffers so the new generic system-framebuffer drivers can be
|
||||
used instead. If the framebuffer is not compatible with the generic
|
||||
modes, it is advertised as fallback platform framebuffer so legacy
|
||||
drivers like efifb, vesafb and uvesafb can pick it up.
|
||||
If this option is not selected, all system framebuffers are always
|
||||
marked as fallback platform framebuffers as usual.
|
||||
user-guidance and debugging.
|
||||
|
||||
Note: Legacy fbdev drivers, including vesafb, efifb, uvesafb, will
|
||||
not be able to pick up generic system framebuffers if this option
|
||||
is selected. You are highly encouraged to enable simplefb as
|
||||
replacement if you select this option. simplefb can correctly deal
|
||||
with generic system framebuffers. But you should still keep vesafb
|
||||
and others enabled as fallback if a system framebuffer is
|
||||
incompatible with simplefb.
|
||||
This option, if enabled, marks VBE/EFI framebuffers as system
|
||||
framebuffers so the generic simpledrm driver can be used.
|
||||
|
||||
If unsure, say Y.
|
||||
This option is deprecated and will be removed in the near future. If
|
||||
unsure, say N and select efidrm, vesadrm instead. The dedicated DRM
|
||||
drivers provide the same functionality plus additional features.
|
||||
|
||||
config TH1520_AON_PROTOCOL
|
||||
tristate "Always-On firmware protocol"
|
||||
|
|
|
|||
|
|
@ -4018,11 +4018,13 @@ static void dm_set_panel_type(struct amdgpu_dm_connector *aconnector)
|
|||
link->panel_type = PANEL_TYPE_OLED;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: get panel type from DID2 that has device technology field
|
||||
* to specify if it's OLED or not. But we need to wait for DID2
|
||||
* support in DC and EDID parser to be able to use it here.
|
||||
*/
|
||||
/* If VSDB and DPCD didn't determine panel type, check DID */
|
||||
if (link->panel_type == PANEL_TYPE_NONE) {
|
||||
if (display_info->panel_type == DRM_MODE_PANEL_TYPE_LCD)
|
||||
link->panel_type = PANEL_TYPE_LCD;
|
||||
else if (display_info->panel_type == DRM_MODE_PANEL_TYPE_OLED)
|
||||
link->panel_type = PANEL_TYPE_OLED;
|
||||
}
|
||||
|
||||
if (link->panel_type == PANEL_TYPE_NONE) {
|
||||
struct drm_amd_vsdb_info *vsdb = &display_info->amd_vsdb;
|
||||
|
|
@ -4040,6 +4042,10 @@ static void dm_set_panel_type(struct amdgpu_dm_connector *aconnector)
|
|||
drm_object_property_set_value(&connector->base,
|
||||
adev_to_drm(adev)->mode_config.panel_type_property,
|
||||
DRM_MODE_PANEL_TYPE_OLED);
|
||||
else if (link->panel_type == PANEL_TYPE_LCD)
|
||||
drm_object_property_set_value(&connector->base,
|
||||
adev_to_drm(adev)->mode_config.panel_type_property,
|
||||
DRM_MODE_PANEL_TYPE_LCD);
|
||||
else
|
||||
drm_object_property_set_value(&connector->base,
|
||||
adev_to_drm(adev)->mode_config.panel_type_property,
|
||||
|
|
|
|||
|
|
@ -1004,7 +1004,7 @@ static const struct drm_bridge_funcs adv7511_bridge_funcs = {
|
|||
.atomic_disable = adv7511_bridge_atomic_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
|
||||
.hdmi_tmds_char_rate_valid = adv7511_bridge_hdmi_tmds_char_rate_valid,
|
||||
.hdmi_clear_audio_infoframe = adv7511_bridge_hdmi_clear_audio_infoframe,
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ static void analogix_dp_bridge_atomic_post_disable(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs analogix_dp_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = analogix_dp_bridge_atomic_pre_enable,
|
||||
.atomic_enable = analogix_dp_bridge_atomic_enable,
|
||||
.atomic_disable = analogix_dp_bridge_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -2679,7 +2679,7 @@ static const struct drm_bridge_funcs anx7625_bridge_funcs = {
|
|||
.atomic_disable = anx7625_bridge_atomic_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.detect = anx7625_bridge_detect,
|
||||
.edid_read = anx7625_bridge_edid_read,
|
||||
.hpd_enable = anx7625_bridge_hpd_enable,
|
||||
|
|
|
|||
|
|
@ -1009,16 +1009,15 @@ cdns_dsi_bridge_atomic_destroy_state(struct drm_bridge *bridge,
|
|||
}
|
||||
|
||||
static struct drm_bridge_state *
|
||||
cdns_dsi_bridge_atomic_reset(struct drm_bridge *bridge)
|
||||
cdns_dsi_bridge_atomic_create_state(struct drm_bridge *bridge)
|
||||
{
|
||||
struct cdns_dsi_bridge_state *dsi_state;
|
||||
|
||||
dsi_state = kzalloc_obj(*dsi_state);
|
||||
if (!dsi_state)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
memset(dsi_state, 0, sizeof(*dsi_state));
|
||||
dsi_state->base.bridge = bridge;
|
||||
__drm_atomic_helper_bridge_state_init(&dsi_state->base, bridge);
|
||||
|
||||
return &dsi_state->base;
|
||||
}
|
||||
|
|
@ -1029,7 +1028,7 @@ static const struct drm_bridge_funcs cdns_dsi_bridge_funcs = {
|
|||
.atomic_pre_enable = cdns_dsi_bridge_atomic_pre_enable,
|
||||
.atomic_post_disable = cdns_dsi_bridge_atomic_post_disable,
|
||||
.atomic_check = cdns_dsi_bridge_atomic_check,
|
||||
.atomic_reset = cdns_dsi_bridge_atomic_reset,
|
||||
.atomic_create_state = cdns_dsi_bridge_atomic_create_state,
|
||||
.atomic_duplicate_state = cdns_dsi_bridge_atomic_duplicate_state,
|
||||
.atomic_destroy_state = cdns_dsi_bridge_atomic_destroy_state,
|
||||
.atomic_get_input_bus_fmts = cdns_dsi_bridge_get_input_bus_fmts,
|
||||
|
|
|
|||
|
|
@ -1921,15 +1921,15 @@ cdns_mhdp_bridge_atomic_destroy_state(struct drm_bridge *bridge,
|
|||
}
|
||||
|
||||
static struct drm_bridge_state *
|
||||
cdns_mhdp_bridge_atomic_reset(struct drm_bridge *bridge)
|
||||
cdns_mhdp_bridge_atomic_create_state(struct drm_bridge *bridge)
|
||||
{
|
||||
struct cdns_mhdp_bridge_state *cdns_mhdp_state;
|
||||
|
||||
cdns_mhdp_state = kzalloc_obj(*cdns_mhdp_state);
|
||||
if (!cdns_mhdp_state)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
__drm_atomic_helper_bridge_reset(bridge, &cdns_mhdp_state->base);
|
||||
__drm_atomic_helper_bridge_state_init(&cdns_mhdp_state->base, bridge);
|
||||
|
||||
return &cdns_mhdp_state->base;
|
||||
}
|
||||
|
|
@ -2051,7 +2051,7 @@ static const struct drm_bridge_funcs cdns_mhdp_bridge_funcs = {
|
|||
.detach = cdns_mhdp_detach,
|
||||
.atomic_duplicate_state = cdns_mhdp_bridge_atomic_duplicate_state,
|
||||
.atomic_destroy_state = cdns_mhdp_bridge_atomic_destroy_state,
|
||||
.atomic_reset = cdns_mhdp_bridge_atomic_reset,
|
||||
.atomic_create_state = cdns_mhdp_bridge_atomic_create_state,
|
||||
.atomic_get_input_bus_fmts = cdns_mhdp_get_input_bus_fmts,
|
||||
.detect = cdns_mhdp_bridge_detect,
|
||||
.edid_read = cdns_mhdp_bridge_edid_read,
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ chipone_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs chipone_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = chipone_atomic_pre_enable,
|
||||
.atomic_enable = chipone_atomic_enable,
|
||||
.atomic_post_disable = chipone_atomic_post_disable,
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ static const struct drm_bridge_funcs display_connector_bridge_funcs = {
|
|||
.atomic_get_input_bus_fmts = display_connector_get_input_bus_fmts,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static irqreturn_t display_connector_hpd_irq(int irq, void *arg)
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ static const struct drm_bridge_funcs funcs = {
|
|||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = fsl_ldb_atomic_get_input_bus_fmts,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.mode_valid = fsl_ldb_mode_valid,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static const struct drm_bridge_funcs imx_hdmi_pvi_bridge_funcs = {
|
|||
.atomic_get_input_bus_fmts = imx8mp_hdmi_pvi_bridge_get_input_bus_fmts,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static int imx8mp_hdmi_pvi_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ imx8qm_ldb_bridge_mode_valid(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs imx8qm_ldb_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.mode_valid = imx8qm_ldb_bridge_mode_valid,
|
||||
.attach = ldb_bridge_attach_helper,
|
||||
.atomic_check = imx8qm_ldb_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ static const struct drm_bridge_funcs imx8qxp_ldb_bridge_funcs = {
|
|||
.destroy = imx8qxp_ldb_bridge_destroy,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.mode_valid = imx8qxp_ldb_bridge_mode_valid,
|
||||
.attach = ldb_bridge_attach_helper,
|
||||
.atomic_check = imx8qxp_ldb_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ imx8qxp_pc_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs imx8qxp_pc_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.mode_valid = imx8qxp_pc_bridge_mode_valid,
|
||||
.attach = imx8qxp_pc_bridge_attach,
|
||||
.mode_set = imx8qxp_pc_bridge_mode_set,
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ imx8qxp_pixel_link_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs imx8qxp_pixel_link_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = imx8qxp_pixel_link_bridge_attach,
|
||||
.mode_set = imx8qxp_pixel_link_bridge_mode_set,
|
||||
.atomic_enable = imx8qxp_pixel_link_bridge_atomic_enable,
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ imx8qxp_pxl2dpi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs imx8qxp_pxl2dpi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = imx8qxp_pxl2dpi_bridge_attach,
|
||||
.destroy = imx8qxp_pxl2dpi_bridge_destroy,
|
||||
.atomic_check = imx8qxp_pxl2dpi_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ static void inno_hdmi_bridge_atomic_disable(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs inno_hdmi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = inno_hdmi_bridge_atomic_enable,
|
||||
.atomic_disable = inno_hdmi_bridge_atomic_disable,
|
||||
.detect = inno_hdmi_bridge_detect,
|
||||
|
|
|
|||
|
|
@ -829,7 +829,7 @@ static int it6263_hdmi_write_hdmi_infoframe(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs it6263_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = it6263_bridge_attach,
|
||||
.mode_valid = it6263_bridge_mode_valid,
|
||||
.atomic_disable = it6263_bridge_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -3239,7 +3239,7 @@ static const struct drm_edid *it6505_bridge_edid_read(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs it6505_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = it6505_bridge_attach,
|
||||
.detach = it6505_bridge_detach,
|
||||
.mode_valid = it6505_bridge_mode_valid,
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ static int it66121_hdmi_audio_mute_stream(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs it66121_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = it66121_bridge_attach,
|
||||
.atomic_get_output_bus_fmts = it66121_bridge_atomic_get_output_bus_fmts,
|
||||
.atomic_get_input_bus_fmts = it66121_bridge_atomic_get_input_bus_fmts,
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ static const struct drm_bridge_funcs lt9211_funcs = {
|
|||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = lt9211_atomic_get_input_bus_fmts,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static int lt9211_parse_dt(struct lt9211 *ctx)
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,7 @@ static const struct drm_bridge_funcs lt9611_bridge_funcs = {
|
|||
.atomic_post_disable = lt9611_bridge_atomic_post_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = lt9611_atomic_get_input_bus_fmts,
|
||||
|
||||
.hdmi_tmds_char_rate_valid = lt9611_hdmi_tmds_char_rate_valid,
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ static const struct drm_bridge_funcs funcs = {
|
|||
.disable = lvds_codec_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = lvds_codec_atomic_get_input_bus_fmts,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -960,7 +960,7 @@ static u32 *nwl_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs nwl_dsi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_check = nwl_dsi_bridge_atomic_check,
|
||||
.atomic_enable = nwl_dsi_bridge_atomic_enable,
|
||||
.atomic_disable = nwl_dsi_bridge_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static int of_display_mode_bridge_get_modes(struct drm_bridge *bridge,
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct drm_bridge_funcs of_display_mode_bridge_funcs = {
|
||||
static const struct drm_bridge_funcs of_display_mode_bridge_funcs = {
|
||||
.attach = of_display_mode_bridge_attach,
|
||||
.get_modes = of_display_mode_bridge_get_modes,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
|
|||
.atomic_disable = panel_bridge_atomic_disable,
|
||||
.atomic_post_disable = panel_bridge_atomic_post_disable,
|
||||
.get_modes = panel_bridge_get_modes,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = drm_atomic_helper_bridge_propagate_bus_fmt,
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ static const struct drm_bridge_funcs ps8640_bridge_funcs = {
|
|||
.atomic_pre_enable = ps8640_atomic_pre_enable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static int ps8640_bridge_get_dsi_resources(struct device *dev, struct ps8640 *ps_bridge)
|
||||
|
|
|
|||
|
|
@ -1835,7 +1835,7 @@ static int samsung_dsim_attach(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs samsung_dsim_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = samsung_dsim_atomic_get_input_bus_fmts,
|
||||
.atomic_check = samsung_dsim_atomic_check,
|
||||
.atomic_pre_enable = samsung_dsim_atomic_pre_enable,
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ static const struct drm_bridge_funcs sii902x_bridge_funcs = {
|
|||
.atomic_enable = sii902x_bridge_atomic_enable,
|
||||
.detect = sii902x_bridge_detect,
|
||||
.edid_read = sii902x_bridge_edid_read,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = sii902x_bridge_atomic_get_input_bus_fmts,
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ static const struct drm_bridge_funcs ssd2825_bridge_funcs = {
|
|||
.atomic_enable = ssd2825_bridge_atomic_enable,
|
||||
.atomic_disable = ssd2825_bridge_atomic_disable,
|
||||
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1816,7 +1816,7 @@ static struct drm_bridge_state *dw_dp_bridge_atomic_duplicate_state(struct drm_b
|
|||
static const struct drm_bridge_funcs dw_dp_bridge_funcs = {
|
||||
.atomic_duplicate_state = dw_dp_bridge_atomic_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = drm_atomic_helper_bridge_propagate_bus_fmt,
|
||||
.atomic_get_output_bus_fmts = dw_dp_bridge_atomic_get_output_bus_fmts,
|
||||
.atomic_check = dw_dp_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,7 @@ static const struct drm_bridge_funcs dw_hdmi_qp_bridge_funcs = {
|
|||
.atomic_get_output_bus_fmts = drm_atomic_helper_bridge_get_hdmi_output_bus_fmts,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = dw_hdmi_qp_bridge_atomic_enable,
|
||||
.atomic_disable = dw_hdmi_qp_bridge_atomic_disable,
|
||||
.detect = dw_hdmi_qp_bridge_detect,
|
||||
|
|
|
|||
|
|
@ -3027,7 +3027,7 @@ static const struct drm_edid *dw_hdmi_bridge_edid_read(struct drm_bridge *bridge
|
|||
static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = dw_hdmi_bridge_attach,
|
||||
.detach = dw_hdmi_bridge_detach,
|
||||
.atomic_check = dw_hdmi_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -1095,7 +1095,7 @@ static const struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = {
|
|||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = dw_mipi_dsi_bridge_atomic_get_input_bus_fmts,
|
||||
.atomic_check = dw_mipi_dsi_bridge_atomic_check,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = dw_mipi_dsi_bridge_atomic_pre_enable,
|
||||
.atomic_enable = dw_mipi_dsi_bridge_atomic_enable,
|
||||
.atomic_post_disable = dw_mipi_dsi_bridge_post_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ static const struct drm_bridge_funcs dw_mipi_dsi2_bridge_funcs = {
|
|||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = dw_mipi_dsi2_bridge_atomic_get_input_bus_fmts,
|
||||
.atomic_check = dw_mipi_dsi2_bridge_atomic_check,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = dw_mipi_dsi2_bridge_atomic_pre_enable,
|
||||
.atomic_enable = dw_mipi_dsi2_bridge_atomic_enable,
|
||||
.atomic_post_disable = dw_mipi_dsi2_bridge_post_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ static const struct drm_bridge_funcs tc358762_bridge_funcs = {
|
|||
.atomic_enable = tc358762_enable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = tc358762_attach,
|
||||
.mode_set = tc358762_bridge_mode_set,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1933,7 +1933,7 @@ static const struct drm_bridge_funcs tc_dpi_bridge_funcs = {
|
|||
.atomic_disable = tc_dpi_bridge_atomic_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = tc_dpi_atomic_get_input_bus_fmts,
|
||||
};
|
||||
|
||||
|
|
@ -1949,7 +1949,7 @@ static const struct drm_bridge_funcs tc_edp_bridge_funcs = {
|
|||
.edid_read = tc_edid_read,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = drm_atomic_helper_bridge_propagate_bus_fmt,
|
||||
.atomic_get_output_bus_fmts = tc_edp_atomic_get_output_bus_fmts,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,7 @@ static const struct drm_bridge_funcs tc358768_bridge_funcs = {
|
|||
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = tc358768_atomic_get_input_bus_fmts,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ static const struct drm_bridge_funcs tc_bridge_funcs = {
|
|||
.atomic_enable = tc_bridge_atomic_enable,
|
||||
.mode_valid = tc_mode_valid,
|
||||
.atomic_post_disable = tc_bridge_atomic_post_disable,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ static const struct drm_bridge_funcs dlpc_bridge_funcs = {
|
|||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = dlpc_atomic_get_input_bus_fmts,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = dlpc_atomic_pre_enable,
|
||||
.atomic_enable = dlpc_atomic_enable,
|
||||
.atomic_post_disable = dlpc_atomic_post_disable,
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ static const struct drm_bridge_funcs sn65dsi83_funcs = {
|
|||
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_get_input_bus_fmts = sn65dsi83_atomic_get_input_bus_fmts,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1302,7 +1302,7 @@ static const struct drm_bridge_funcs ti_sn_bridge_funcs = {
|
|||
.atomic_enable = ti_sn_bridge_atomic_enable,
|
||||
.atomic_disable = ti_sn_bridge_atomic_disable,
|
||||
.atomic_post_disable = ti_sn_bridge_atomic_post_disable,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.debugfs_init = ti_sn65dsi86_debugfs_init,
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static const struct drm_bridge_funcs tdp158_bridge_funcs = {
|
|||
.atomic_disable = tdp158_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static int tdp158_probe(struct i2c_client *client)
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static const struct drm_bridge_funcs tfp410_bridge_funcs = {
|
|||
.enable = tfp410_enable,
|
||||
.disable = tfp410_disable,
|
||||
.mode_valid = tfp410_mode_valid,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = tfp410_get_input_bus_fmts,
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ EXPORT_SYMBOL(drm_atomic_helper_bridge_duplicate_state);
|
|||
* @state: bridge state to destroy
|
||||
*
|
||||
* Destroys a bridge state previously created by
|
||||
* &drm_atomic_helper_bridge_reset() or
|
||||
* &drm_atomic_helper_bridge_create_state() or
|
||||
* &drm_atomic_helper_bridge_duplicate_state(). This helper is meant to be
|
||||
* used as a bridge &drm_bridge_funcs.atomic_destroy_state hook for bridges
|
||||
* that don't subclass the bridge state.
|
||||
|
|
@ -886,35 +886,39 @@ void drm_atomic_helper_bridge_destroy_state(struct drm_bridge *bridge,
|
|||
EXPORT_SYMBOL(drm_atomic_helper_bridge_destroy_state);
|
||||
|
||||
/**
|
||||
* __drm_atomic_helper_bridge_reset() - Initialize a bridge state to its
|
||||
* __drm_atomic_helper_bridge_state_init() - Initialize a bridge state to its
|
||||
* default
|
||||
* @bridge: the bridge this state refers to
|
||||
* @state: bridge state to initialize
|
||||
* @bridge: the bridge this state refers to
|
||||
*
|
||||
* @state is assumed to be zeroed.
|
||||
*
|
||||
* Initializes the bridge state to default values. This is meant to be called
|
||||
* by the bridge &drm_bridge_funcs.atomic_reset hook for bridges that subclass
|
||||
* the bridge state.
|
||||
* by the bridge &drm_bridge_funcs.atomic_create_state hook for bridges that
|
||||
* subclass the bridge state.
|
||||
*/
|
||||
void __drm_atomic_helper_bridge_reset(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *state)
|
||||
void __drm_atomic_helper_bridge_state_init(struct drm_bridge_state *state,
|
||||
struct drm_bridge *bridge)
|
||||
{
|
||||
memset(state, 0, sizeof(*state));
|
||||
__drm_atomic_helper_private_obj_create_state(&bridge->base, &state->base);
|
||||
state->bridge = bridge;
|
||||
}
|
||||
EXPORT_SYMBOL(__drm_atomic_helper_bridge_reset);
|
||||
EXPORT_SYMBOL(__drm_atomic_helper_bridge_state_init);
|
||||
|
||||
/**
|
||||
* drm_atomic_helper_bridge_reset() - Allocate and initialize a bridge state
|
||||
* to its default
|
||||
* @bridge: the bridge this state refers to
|
||||
* drm_atomic_helper_bridge_create_state - default
|
||||
* &drm_bridge_funcs.atomic_create_state hook for bridges
|
||||
* @bridge: bridge object
|
||||
*
|
||||
* Allocates the bridge state and initializes it to default values. This helper
|
||||
* is meant to be used as a bridge &drm_bridge_funcs.atomic_reset hook for
|
||||
* bridges that don't subclass the bridge state.
|
||||
* Allocates and initializes pristine @drm_bridge_state.
|
||||
*
|
||||
* This is useful for drivers that don't subclass @drm_bridge_state.
|
||||
*
|
||||
* RETURNS:
|
||||
* Pointer to new bridge state, or ERR_PTR on failure.
|
||||
*/
|
||||
struct drm_bridge_state *
|
||||
drm_atomic_helper_bridge_reset(struct drm_bridge *bridge)
|
||||
drm_atomic_helper_bridge_create_state(struct drm_bridge *bridge)
|
||||
{
|
||||
struct drm_bridge_state *bridge_state;
|
||||
|
||||
|
|
@ -922,7 +926,7 @@ drm_atomic_helper_bridge_reset(struct drm_bridge *bridge)
|
|||
if (!bridge_state)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
__drm_atomic_helper_bridge_reset(bridge, bridge_state);
|
||||
__drm_atomic_helper_bridge_state_init(bridge_state, bridge);
|
||||
return bridge_state;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_bridge_reset);
|
||||
EXPORT_SYMBOL(drm_atomic_helper_bridge_create_state);
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ drm_bridge_atomic_create_priv_state(struct drm_private_obj *obj)
|
|||
struct drm_bridge *bridge = drm_priv_to_bridge(obj);
|
||||
struct drm_bridge_state *state;
|
||||
|
||||
state = bridge->funcs->atomic_reset(bridge);
|
||||
state = bridge->funcs->atomic_create_state(bridge);
|
||||
if (IS_ERR(state))
|
||||
return ERR_CAST(state);
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ static const struct drm_private_state_funcs drm_bridge_priv_state_funcs = {
|
|||
|
||||
static bool drm_bridge_is_atomic(struct drm_bridge *bridge)
|
||||
{
|
||||
return bridge->funcs->atomic_reset != NULL;
|
||||
return bridge->funcs->atomic_create_state != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1189,6 +1189,7 @@ static const struct drm_prop_enum_list drm_link_status_enum_list[] = {
|
|||
static const struct drm_prop_enum_list drm_panel_type_enum_list[] = {
|
||||
{ DRM_MODE_PANEL_TYPE_UNKNOWN, "unknown" },
|
||||
{ DRM_MODE_PANEL_TYPE_OLED, "OLED" },
|
||||
{ DRM_MODE_PANEL_TYPE_LCD, "LCD" },
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1533,7 +1534,7 @@ EXPORT_SYMBOL(drm_hdmi_connector_get_output_format_name);
|
|||
* never read back the value of "DPMS" because it can be incorrect.
|
||||
* panel_type:
|
||||
* Immutable enum property to indicate the type of connected panel.
|
||||
* Possible values are "unknown" (default) and "OLED".
|
||||
* Possible values are "unknown" (default), "OLED", and "LCD".
|
||||
* PATH:
|
||||
* Connector path property to identify how this sink is physically
|
||||
* connected. Used by DP MST. This should be set by calling
|
||||
|
|
|
|||
|
|
@ -142,6 +142,30 @@ struct displayid_formula_timing_block {
|
|||
struct displayid_formula_timings_9 timings[];
|
||||
} __packed;
|
||||
|
||||
#define DISPLAYID_DEVICE_TECH_UNSPECIFIED 0
|
||||
#define DISPLAYID_DEVICE_TECH_LCD 1
|
||||
#define DISPLAYID_DEVICE_TECH_OLED 2
|
||||
|
||||
#define DISPLAYID_DISPLAY_PARAMS_DEVICE_TECH GENMASK(6, 4)
|
||||
|
||||
struct displayid_display_params_block {
|
||||
struct displayid_block base;
|
||||
__le16 horiz_image_size;
|
||||
__le16 vert_image_size;
|
||||
__le16 horiz_pixel_count;
|
||||
__le16 vert_pixel_count;
|
||||
u8 features;
|
||||
u8 primary_color1[3];
|
||||
u8 primary_color2[3];
|
||||
u8 primary_color3[3];
|
||||
u8 white_point[3];
|
||||
__le16 max_luminance_full;
|
||||
__le16 max_luminance_10;
|
||||
__le16 min_luminance;
|
||||
u8 color_depth_and_tech; /* [2:0] depth, [6:4] device tech, [7] theme */
|
||||
u8 gamma_eotf;
|
||||
} __packed;
|
||||
|
||||
#define DISPLAYID_VESA_MSO_OVERLAP GENMASK(3, 0)
|
||||
#define DISPLAYID_VESA_MSO_MODE GENMASK(6, 5)
|
||||
|
||||
|
|
|
|||
|
|
@ -6713,32 +6713,82 @@ static void drm_reset_display_info(struct drm_connector *connector)
|
|||
|
||||
info->source_physical_address = CEC_PHYS_ADDR_INVALID;
|
||||
memset(&info->amd_vsdb, 0, sizeof(info->amd_vsdb));
|
||||
|
||||
info->panel_type = DRM_MODE_PANEL_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
static void drm_displayid_process_base_section_header(struct drm_connector *connector,
|
||||
const struct displayid_iter *iter)
|
||||
{
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
|
||||
drm_dbg_kms(connector->dev,
|
||||
"[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
|
||||
connector->base.id, connector->name,
|
||||
displayid_version(iter),
|
||||
displayid_primary_use(iter));
|
||||
if (displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
|
||||
(displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
|
||||
displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
|
||||
info->non_desktop = true;
|
||||
}
|
||||
|
||||
static void
|
||||
drm_displayid_parse_display_params(struct drm_connector *connector,
|
||||
const struct displayid_block *block)
|
||||
{
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
const struct displayid_display_params_block *params =
|
||||
(const struct displayid_display_params_block *)block;
|
||||
u8 tech;
|
||||
|
||||
if (block->num_bytes < sizeof(*params) - sizeof(params->base)) {
|
||||
drm_dbg_kms(connector->dev,
|
||||
"[CONNECTOR:%d:%s] DisplayID Display Parameters block too short (%u < %zu)\n",
|
||||
connector->base.id, connector->name,
|
||||
block->num_bytes,
|
||||
sizeof(*params) - sizeof(params->base));
|
||||
return;
|
||||
}
|
||||
|
||||
tech = FIELD_GET(DISPLAYID_DISPLAY_PARAMS_DEVICE_TECH,
|
||||
params->color_depth_and_tech);
|
||||
|
||||
drm_dbg_kms(connector->dev,
|
||||
"[CONNECTOR:%d:%s] DisplayID Display Parameters: device technology %s\n",
|
||||
connector->base.id, connector->name,
|
||||
tech == DISPLAYID_DEVICE_TECH_LCD ? "LCD" :
|
||||
tech == DISPLAYID_DEVICE_TECH_OLED ? "OLED" : "unspecified");
|
||||
|
||||
switch (tech) {
|
||||
case DISPLAYID_DEVICE_TECH_LCD:
|
||||
info->panel_type = DRM_MODE_PANEL_TYPE_LCD;
|
||||
break;
|
||||
case DISPLAYID_DEVICE_TECH_OLED:
|
||||
info->panel_type = DRM_MODE_PANEL_TYPE_OLED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void update_displayid_info(struct drm_connector *connector,
|
||||
const struct drm_edid *drm_edid)
|
||||
{
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
const struct displayid_block *block;
|
||||
struct displayid_iter iter;
|
||||
bool base_section_header_processed = false;
|
||||
|
||||
displayid_iter_edid_begin(drm_edid, &iter);
|
||||
displayid_iter_for_each(block, &iter) {
|
||||
drm_dbg_kms(connector->dev,
|
||||
"[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
|
||||
connector->base.id, connector->name,
|
||||
displayid_version(&iter),
|
||||
displayid_primary_use(&iter));
|
||||
if (displayid_version(&iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
|
||||
(displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
|
||||
displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
|
||||
info->non_desktop = true;
|
||||
if (!base_section_header_processed) {
|
||||
drm_displayid_process_base_section_header(connector, &iter);
|
||||
base_section_header_processed = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* We're only interested in the base section here, no need to
|
||||
* iterate further.
|
||||
*/
|
||||
break;
|
||||
if (displayid_version(&iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
|
||||
block->tag == DATA_BLOCK_2_DISPLAY_PARAMETERS)
|
||||
drm_displayid_parse_display_params(connector, block);
|
||||
}
|
||||
displayid_iter_end(&iter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1744,21 +1744,17 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config);
|
|||
*/
|
||||
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (!drm_fbdev_emulation || !fb_helper)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&fb_helper->lock);
|
||||
if (fb_helper->deferred_setup) {
|
||||
err = __drm_fb_helper_initial_config_and_unlock(fb_helper);
|
||||
return err;
|
||||
}
|
||||
if (fb_helper->deferred_setup)
|
||||
return __drm_fb_helper_initial_config_and_unlock(fb_helper);
|
||||
|
||||
if (!fb_helper->fb || !drm_master_internal_acquire(fb_helper->dev)) {
|
||||
fb_helper->delayed_hotplug = true;
|
||||
mutex_unlock(&fb_helper->lock);
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
drm_master_internal_release(fb_helper->dev);
|
||||
|
|
@ -1802,4 +1798,3 @@ bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
|
|||
return gem == obj;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_fb_helper_gem_is_fb);
|
||||
|
||||
|
|
|
|||
|
|
@ -473,10 +473,23 @@ void drm_gem_shmem_vunmap_locked(struct drm_gem_shmem_object *shmem,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(drm_gem_shmem_vunmap_locked);
|
||||
|
||||
static int
|
||||
drm_gem_shmem_create_with_handle(struct drm_file *file_priv,
|
||||
struct drm_device *dev, size_t size,
|
||||
uint32_t *handle)
|
||||
/**
|
||||
* drm_gem_shmem_create_with_handle - Allocate an object with the given size and
|
||||
* returns a GEM handle
|
||||
* @file_priv: DRM file structure to create the dumb buffer for
|
||||
* @dev: DRM device
|
||||
* @size: Size of the object to allocate
|
||||
* @handle: Returns the GEM handle on success
|
||||
*
|
||||
* Allocates an shmem GEM buffer using drm_gem_shmem_create() and returns
|
||||
* a GEM handle to it.
|
||||
*
|
||||
* Returns:
|
||||
* Zero on success, or an error code otherwise.
|
||||
*/
|
||||
int drm_gem_shmem_create_with_handle(struct drm_file *file_priv,
|
||||
struct drm_device *dev, size_t size,
|
||||
uint32_t *handle)
|
||||
{
|
||||
struct drm_gem_shmem_object *shmem;
|
||||
int ret;
|
||||
|
|
@ -495,6 +508,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_gem_shmem_create_with_handle);
|
||||
|
||||
/* Update madvise status, returns true if not purged, else
|
||||
* false or -errno.
|
||||
|
|
|
|||
|
|
@ -5,10 +5,8 @@ config DRM_HISI_HIBMC
|
|||
select DRM_CLIENT_SELECTION
|
||||
select DRM_DISPLAY_HELPER
|
||||
select DRM_DISPLAY_DP_HELPER
|
||||
select DRM_GEM_SHMEM_HELPER
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_VRAM_HELPER
|
||||
select DRM_TTM
|
||||
select DRM_TTM_HELPER
|
||||
select I2C
|
||||
select I2C_ALGOBIT
|
||||
help
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@
|
|||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_damage_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_gem_vram_helper.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "hibmc_drm_drv.h"
|
||||
|
|
@ -72,74 +74,69 @@ static int hibmc_get_best_clock_idx(const struct drm_display_mode *mode)
|
|||
static int hibmc_plane_atomic_check(struct drm_plane *plane,
|
||||
struct drm_atomic_commit *state)
|
||||
{
|
||||
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
|
||||
plane);
|
||||
struct drm_framebuffer *fb = new_plane_state->fb;
|
||||
struct drm_crtc *crtc = new_plane_state->crtc;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
u32 src_w = new_plane_state->src_w >> 16;
|
||||
u32 src_h = new_plane_state->src_h >> 16;
|
||||
struct drm_plane_state *new_plane_state =
|
||||
drm_atomic_get_new_plane_state(state, plane);
|
||||
struct drm_crtc_state *new_crtc_state = NULL;
|
||||
int ret;
|
||||
|
||||
if (!crtc || !fb)
|
||||
if (new_plane_state->crtc)
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(state, new_plane_state->crtc);
|
||||
|
||||
ret = drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
|
||||
DRM_PLANE_NO_SCALING,
|
||||
DRM_PLANE_NO_SCALING,
|
||||
false, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
else if (!new_plane_state->visible)
|
||||
return 0;
|
||||
|
||||
crtc_state = drm_atomic_get_crtc_state(state, crtc);
|
||||
if (IS_ERR(crtc_state))
|
||||
return PTR_ERR(crtc_state);
|
||||
|
||||
if (src_w != new_plane_state->crtc_w || src_h != new_plane_state->crtc_h) {
|
||||
drm_dbg_atomic(plane->dev, "scale not support\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (new_plane_state->crtc_x < 0 || new_plane_state->crtc_y < 0) {
|
||||
drm_dbg_atomic(plane->dev, "crtc_x/y of drm_plane state is invalid\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!crtc_state->enable)
|
||||
return 0;
|
||||
|
||||
if (new_plane_state->crtc_x + new_plane_state->crtc_w >
|
||||
crtc_state->adjusted_mode.hdisplay ||
|
||||
new_plane_state->crtc_y + new_plane_state->crtc_h >
|
||||
crtc_state->adjusted_mode.vdisplay) {
|
||||
drm_dbg_atomic(plane->dev, "visible portion of plane is invalid\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (new_plane_state->fb->pitches[0] % 128 != 0) {
|
||||
drm_dbg_atomic(plane->dev, "wrong stride with 128-byte aligned\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hibmc_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_atomic_commit *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
|
||||
plane);
|
||||
u32 reg;
|
||||
s64 gpu_addr = 0;
|
||||
u32 line_l;
|
||||
struct hibmc_drm_private *priv = to_hibmc_drm_private(plane->dev);
|
||||
struct drm_gem_vram_object *gbo;
|
||||
struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane);
|
||||
struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(new_state);
|
||||
struct drm_framebuffer *fb = new_state->fb;
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
u32 gpu_addr = 0;
|
||||
u32 reg;
|
||||
u32 line_l;
|
||||
|
||||
if (!new_state->fb)
|
||||
if (!fb)
|
||||
return;
|
||||
|
||||
gbo = drm_gem_vram_of_gem(new_state->fb->obj[0]);
|
||||
if (drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE) == 0) {
|
||||
struct drm_rect damage;
|
||||
struct drm_atomic_helper_damage_iter iter;
|
||||
|
||||
gpu_addr = drm_gem_vram_offset(gbo);
|
||||
if (WARN_ON_ONCE(gpu_addr < 0))
|
||||
return; /* Bug: we didn't pin the BO to VRAM in prepare_fb. */
|
||||
drm_atomic_helper_damage_iter_init(&iter, old_state, new_state);
|
||||
drm_atomic_for_each_plane_damage(&iter, &damage) {
|
||||
struct iosys_map dst[DRM_FORMAT_MAX_PLANES] = {
|
||||
IOSYS_MAP_INIT_VADDR_IOMEM(priv->vram + gpu_addr),
|
||||
};
|
||||
|
||||
iosys_map_incr(&dst[0],
|
||||
drm_fb_clip_offset(fb->pitches[0], fb->format, &damage));
|
||||
drm_fb_memcpy(dst, fb->pitches, shadow_plane_state->data, fb, &damage);
|
||||
}
|
||||
|
||||
drm_gem_fb_end_cpu_access(fb, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
writel(gpu_addr, priv->mmio + HIBMC_CRT_FB_ADDRESS);
|
||||
|
||||
reg = new_state->fb->width * (new_state->fb->format->cpp[0]);
|
||||
reg = drm_format_info_min_pitch(fb->format, 0, fb->width);
|
||||
|
||||
line_l = new_state->fb->pitches[0];
|
||||
line_l = fb->pitches[0];
|
||||
writel(HIBMC_FIELD(HIBMC_CRT_FB_WIDTH_WIDTH, reg) |
|
||||
HIBMC_FIELD(HIBMC_CRT_FB_WIDTH_OFFS, line_l),
|
||||
priv->mmio + HIBMC_CRT_FB_WIDTH);
|
||||
|
|
@ -147,29 +144,31 @@ static void hibmc_plane_atomic_update(struct drm_plane *plane,
|
|||
/* SET PIXEL FORMAT */
|
||||
reg = readl(priv->mmio + HIBMC_CRT_DISP_CTL);
|
||||
reg &= ~HIBMC_CRT_DISP_CTL_FORMAT_MASK;
|
||||
reg |= HIBMC_FIELD(HIBMC_CRT_DISP_CTL_FORMAT,
|
||||
new_state->fb->format->cpp[0] * 8 / 16);
|
||||
switch (fb->format->format) {
|
||||
case DRM_FORMAT_XRGB8888:
|
||||
reg |= HIBMC_FIELD(HIBMC_CRT_DISP_CTL_FORMAT, 2);
|
||||
break;
|
||||
case DRM_FORMAT_RGB565:
|
||||
reg |= HIBMC_FIELD(HIBMC_CRT_DISP_CTL_FORMAT, 1);
|
||||
break;
|
||||
}
|
||||
writel(reg, priv->mmio + HIBMC_CRT_DISP_CTL);
|
||||
}
|
||||
|
||||
static const u32 channel_formats1[] = {
|
||||
DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_BGR888, DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888, DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_ABGR8888
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_RGB565,
|
||||
};
|
||||
|
||||
static const struct drm_plane_funcs hibmc_plane_funcs = {
|
||||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
.destroy = drm_plane_cleanup,
|
||||
.reset = drm_atomic_helper_plane_reset,
|
||||
.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
|
||||
DRM_GEM_SHADOW_PLANE_FUNCS,
|
||||
};
|
||||
|
||||
static const struct drm_plane_helper_funcs hibmc_plane_helper_funcs = {
|
||||
DRM_GEM_VRAM_PLANE_HELPER_FUNCS,
|
||||
DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
|
||||
.atomic_check = hibmc_plane_atomic_check,
|
||||
.atomic_update = hibmc_plane_atomic_update,
|
||||
};
|
||||
|
|
@ -529,6 +528,7 @@ int hibmc_de_init(struct hibmc_drm_private *priv)
|
|||
}
|
||||
|
||||
drm_plane_helper_add(plane, &hibmc_plane_helper_funcs);
|
||||
drm_plane_enable_fb_damage_clips(plane);
|
||||
|
||||
ret = drm_crtc_init_with_planes(dev, crtc, plane,
|
||||
NULL, &hibmc_crtc_funcs, NULL);
|
||||
|
|
|
|||
|
|
@ -14,13 +14,15 @@
|
|||
#include <linux/aperture.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <drm/clients/drm_client_setup.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fbdev_ttm.h>
|
||||
#include <drm/drm_dumb_buffers.h>
|
||||
#include <drm/drm_fbdev_shmem.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_gem_vram_helper.h>
|
||||
#include <drm/drm_gem_shmem_helper.h>
|
||||
#include <drm/drm_managed.h>
|
||||
#include <drm/drm_module.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
|
@ -71,7 +73,13 @@ static irqreturn_t hibmc_dp_interrupt(int irq, void *arg)
|
|||
static int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args)
|
||||
{
|
||||
return drm_gem_vram_fill_create_dumb(file, dev, 0, 128, args);
|
||||
int ret;
|
||||
|
||||
ret = drm_mode_size_dumb(dev, args, SZ_128, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return drm_gem_shmem_create_with_handle(file, dev, args->size, &args->handle);
|
||||
}
|
||||
|
||||
static const struct drm_driver hibmc_driver = {
|
||||
|
|
@ -81,10 +89,9 @@ static const struct drm_driver hibmc_driver = {
|
|||
.desc = "hibmc drm driver",
|
||||
.major = 1,
|
||||
.minor = 0,
|
||||
.debugfs_init = drm_vram_mm_debugfs_init,
|
||||
.dumb_create = hibmc_dumb_create,
|
||||
.dumb_map_offset = drm_gem_ttm_dumb_map_offset,
|
||||
DRM_FBDEV_TTM_DRIVER_OPS,
|
||||
.gem_prime_import = drm_gem_shmem_prime_import_no_map,
|
||||
.dumb_create = hibmc_dumb_create,
|
||||
DRM_FBDEV_SHMEM_DRIVER_OPS,
|
||||
};
|
||||
|
||||
static int __maybe_unused hibmc_pm_suspend(struct device *dev)
|
||||
|
|
@ -106,11 +113,47 @@ static const struct dev_pm_ops hibmc_pm_ops = {
|
|||
hibmc_pm_resume)
|
||||
};
|
||||
|
||||
static enum drm_mode_status hibmc_mode_config_mode_valid(struct drm_device *dev,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
const struct drm_format_info *info =
|
||||
drm_get_format_info(dev, DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR);
|
||||
struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
|
||||
unsigned long max_fb_size = priv->vram_size;
|
||||
u64 pitch;
|
||||
|
||||
if (drm_WARN_ON_ONCE(dev, !info))
|
||||
return MODE_ERROR; /* driver bug */
|
||||
|
||||
pitch = drm_format_info_min_pitch(info, 0, mode->hdisplay);
|
||||
if (!pitch)
|
||||
return MODE_BAD_WIDTH;
|
||||
else if (pitch > max_fb_size / mode->vdisplay)
|
||||
return MODE_MEM;
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
static struct drm_framebuffer *hibmc_mode_config_fb_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv,
|
||||
const struct drm_format_info *info,
|
||||
const struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < info->num_planes; ++i) {
|
||||
if (mode_cmd->pitches[i] % SZ_128)
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
return drm_gem_fb_create_with_dirty(dev, file_priv, info, mode_cmd);
|
||||
}
|
||||
|
||||
static const struct drm_mode_config_funcs hibmc_mode_funcs = {
|
||||
.mode_valid = drm_vram_helper_mode_valid,
|
||||
.mode_valid = hibmc_mode_config_mode_valid,
|
||||
.atomic_check = drm_atomic_helper_check,
|
||||
.atomic_commit = drm_atomic_helper_commit,
|
||||
.fb_create = drm_gem_fb_create,
|
||||
.fb_create = hibmc_mode_config_fb_create,
|
||||
};
|
||||
|
||||
static int hibmc_kms_init(struct hibmc_drm_private *priv)
|
||||
|
|
@ -130,7 +173,6 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
|
|||
dev->mode_config.max_height = 1200;
|
||||
|
||||
dev->mode_config.preferred_depth = 24;
|
||||
dev->mode_config.prefer_shadow = 1;
|
||||
|
||||
dev->mode_config.funcs = (void *)&hibmc_mode_funcs;
|
||||
|
||||
|
|
@ -335,18 +377,22 @@ static int hibmc_load(struct drm_device *dev)
|
|||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
|
||||
resource_size_t vram_base, vram_size;
|
||||
int ret;
|
||||
|
||||
ret = hibmc_hw_init(priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = drmm_vram_helper_init(dev, pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0));
|
||||
if (ret) {
|
||||
drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
vram_base = pci_resource_start(pdev, 0);
|
||||
vram_size = pci_resource_len(pdev, 0);
|
||||
|
||||
priv->vram = devm_ioremap_wc(dev->dev, vram_base, vram_size);
|
||||
if (!priv->vram)
|
||||
return -ENOMEM;
|
||||
|
||||
priv->vram_base = vram_base;
|
||||
priv->vram_size = vram_size;
|
||||
|
||||
ret = hibmc_kms_init(priv);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ struct hibmc_drm_private {
|
|||
/* hw */
|
||||
void __iomem *mmio;
|
||||
|
||||
/* vram */
|
||||
void __iomem *vram;
|
||||
resource_size_t vram_base;
|
||||
resource_size_t vram_size;
|
||||
|
||||
/* drm */
|
||||
struct drm_device dev;
|
||||
struct drm_plane primary_plane;
|
||||
|
|
|
|||
|
|
@ -2203,17 +2203,56 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static u16 intel_dp_dsc_max_delta_bppx16(const struct intel_connector *connector,
|
||||
enum intel_output_format output_format)
|
||||
{
|
||||
const u8 *dsc_dpcd = connector->dp.dsc_dpcd;
|
||||
u8 max_bpp_delta_v1 = dsc_dpcd[DP_DSC_MAX_BPP_DELTA_VERSION_1 - DP_DSC_SUPPORT];
|
||||
int max_bpp;
|
||||
|
||||
if (!(dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
|
||||
DP_DSC_MAX_BPP_DELTA_AVAILABILITY))
|
||||
return 0;
|
||||
|
||||
switch (output_format) {
|
||||
case INTEL_OUTPUT_FORMAT_RGB:
|
||||
case INTEL_OUTPUT_FORMAT_YCBCR444:
|
||||
max_bpp = max_bpp_delta_v1 & DP_DSC_RGB_YCbCr444_MAX_BPP_DELTA_MASK;
|
||||
if (max_bpp >= 1 && max_bpp <= 21)
|
||||
max_bpp = max_bpp + DP_DSC_BPP_DELTA_444 - 1;
|
||||
else
|
||||
max_bpp = 0;
|
||||
break;
|
||||
case INTEL_OUTPUT_FORMAT_YCBCR420:
|
||||
max_bpp = (max_bpp_delta_v1 & DP_DSC_NATIVE_YCbCr420_MAX_BPP_DELTA_MASK) >>
|
||||
DP_DSC_BPP_DELTA_SHIFT_420;
|
||||
if (max_bpp >= 1 && max_bpp <= 7)
|
||||
max_bpp = max_bpp + DP_DSC_BPP_DELTA_420 - 1;
|
||||
break;
|
||||
default:
|
||||
MISSING_CASE(output_format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return max_bpp << 4;
|
||||
}
|
||||
|
||||
static
|
||||
u16 intel_dp_dsc_max_sink_compressed_bppx16(const struct intel_connector *connector,
|
||||
enum intel_output_format output_format,
|
||||
int bpc)
|
||||
{
|
||||
u16 max_bppx16 = drm_edp_dsc_sink_output_bpp(connector->dp.dsc_dpcd);
|
||||
u16 max_bppx16 = intel_dp_dsc_max_delta_bppx16(connector, output_format);
|
||||
|
||||
if (max_bppx16)
|
||||
return max_bppx16;
|
||||
|
||||
max_bppx16 = drm_edp_dsc_sink_output_bpp(connector->dp.dsc_dpcd);
|
||||
|
||||
if (max_bppx16)
|
||||
return max_bppx16;
|
||||
/*
|
||||
* If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
|
||||
* If support not given in DPCD 67h, 68h, 6Eh, 6Fh use the Maximum Allowed bit rate
|
||||
* values as given in spec Table 2-157 DP v2.0
|
||||
*/
|
||||
switch (output_format) {
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ static void enable_signaling(struct i915_active_fence *active)
|
|||
if (!fence)
|
||||
return;
|
||||
|
||||
dma_fence_enable_sw_signaling(fence);
|
||||
dma_fence_enable_signaling(fence);
|
||||
dma_fence_put(fence);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ static int imx_pd_bridge_attach(struct drm_bridge *bridge,
|
|||
|
||||
static const struct drm_bridge_funcs imx_pd_bridge_funcs = {
|
||||
.attach = imx_pd_bridge_attach,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_check = imx_pd_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -1031,7 +1031,7 @@ static const struct drm_bridge_funcs ingenic_drm_bridge_funcs = {
|
|||
.atomic_enable = ingenic_drm_bridge_atomic_enable,
|
||||
.atomic_disable = ingenic_drm_bridge_atomic_disable,
|
||||
.atomic_check = ingenic_drm_bridge_atomic_check,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_input_bus_fmts = ingenic_drm_bridge_atomic_get_input_bus_fmts,
|
||||
|
|
|
|||
|
|
@ -368,12 +368,6 @@ int lima_device_init(struct lima_device *ldev)
|
|||
if (err)
|
||||
goto err_out0;
|
||||
|
||||
ldev->empty_vm = lima_vm_create(ldev);
|
||||
if (!ldev->empty_vm) {
|
||||
err = -ENOMEM;
|
||||
goto err_out1;
|
||||
}
|
||||
|
||||
ldev->va_start = 0;
|
||||
if (ldev->id == lima_gpu_mali450) {
|
||||
ldev->va_end = LIMA_VA_RESERVE_START;
|
||||
|
|
@ -387,6 +381,12 @@ int lima_device_init(struct lima_device *ldev)
|
|||
} else
|
||||
ldev->va_end = LIMA_VA_RESERVE_END;
|
||||
|
||||
ldev->empty_vm = lima_vm_create(ldev);
|
||||
if (!ldev->empty_vm) {
|
||||
err = -ENOMEM;
|
||||
goto err_out1;
|
||||
}
|
||||
|
||||
ldev->iomem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(ldev->iomem)) {
|
||||
dev_err(ldev->dev, "fail to ioremap iomem\n");
|
||||
|
|
|
|||
|
|
@ -2578,7 +2578,7 @@ static const struct drm_bridge_funcs mtk_dp_bridge_funcs = {
|
|||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_get_output_bus_fmts = mtk_dp_bridge_atomic_get_output_bus_fmts,
|
||||
.atomic_get_input_bus_fmts = mtk_dp_bridge_atomic_get_input_bus_fmts,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = mtk_dp_bridge_attach,
|
||||
.detach = mtk_dp_bridge_detach,
|
||||
.atomic_enable = mtk_dp_bridge_atomic_enable,
|
||||
|
|
|
|||
|
|
@ -989,7 +989,7 @@ static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
|
|||
.atomic_get_input_bus_fmts = mtk_dpi_bridge_atomic_get_input_bus_fmts,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.debugfs_init = mtk_dpi_debugfs_init,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -894,7 +894,7 @@ static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = {
|
|||
.atomic_enable = mtk_dsi_bridge_atomic_enable,
|
||||
.atomic_pre_enable = mtk_dsi_bridge_atomic_pre_enable,
|
||||
.atomic_post_disable = mtk_dsi_bridge_atomic_post_disable,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.mode_valid = mtk_dsi_bridge_mode_valid,
|
||||
.mode_set = mtk_dsi_bridge_mode_set,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1072,7 +1072,7 @@ static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = {
|
|||
.mode_valid = mtk_hdmi_bridge_mode_valid,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.attach = mtk_hdmi_bridge_attach,
|
||||
.mode_fixup = mtk_hdmi_bridge_mode_fixup,
|
||||
.atomic_disable = mtk_hdmi_bridge_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -1326,7 +1326,7 @@ static const struct drm_bridge_funcs mtk_v2_hdmi_bridge_funcs = {
|
|||
.atomic_post_disable = mtk_hdmi_v2_bridge_post_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.detect = mtk_hdmi_v2_bridge_detect,
|
||||
.edid_read = mtk_hdmi_v2_bridge_edid_read,
|
||||
.hpd_enable = mtk_hdmi_v2_hpd_enable,
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ static const struct drm_bridge_funcs meson_encoder_cvbs_bridge_funcs = {
|
|||
.atomic_check = meson_encoder_cvbs_atomic_check,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
int meson_encoder_cvbs_probe(struct meson_drm *priv)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static const struct drm_bridge_funcs meson_encoder_dsi_bridge_funcs = {
|
|||
.atomic_disable = meson_encoder_dsi_atomic_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
int meson_encoder_dsi_probe(struct meson_drm *priv)
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ static const struct drm_bridge_funcs meson_encoder_hdmi_bridge_funcs = {
|
|||
.atomic_check = meson_encoder_hdmi_atomic_check,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
int meson_encoder_hdmi_probe(struct meson_drm *priv)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static void msm_dp_bridge_debugfs_init(struct drm_bridge *bridge, struct dentry
|
|||
static const struct drm_bridge_funcs msm_dp_bridge_ops = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = msm_dp_bridge_atomic_enable,
|
||||
.atomic_disable = msm_dp_bridge_atomic_disable,
|
||||
.atomic_post_disable = msm_dp_bridge_atomic_post_disable,
|
||||
|
|
@ -235,7 +235,7 @@ static const struct drm_bridge_funcs msm_edp_bridge_ops = {
|
|||
.atomic_post_disable = msm_edp_bridge_atomic_post_disable,
|
||||
.mode_set = msm_dp_bridge_mode_set,
|
||||
.mode_valid = msm_edp_bridge_mode_valid,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_check = msm_edp_bridge_atomic_check,
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ static enum drm_mode_status msm_hdmi_bridge_tmds_char_rate_valid(const struct dr
|
|||
static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = msm_hdmi_bridge_atomic_pre_enable,
|
||||
.atomic_post_disable = msm_hdmi_bridge_atomic_post_disable,
|
||||
.edid_read = msm_hdmi_bridge_edid_read,
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ static int lcdif_load(struct drm_device *drm)
|
|||
|
||||
ret = lcdif_attach_bridge(lcdif);
|
||||
if (ret)
|
||||
return dev_err_probe(drm->dev, ret, "Cannot connect bridge\n");
|
||||
return ret;
|
||||
|
||||
drm->mode_config.min_width = LCDIF_MIN_XRES;
|
||||
drm->mode_config.min_height = LCDIF_MIN_YRES;
|
||||
|
|
|
|||
|
|
@ -153,22 +153,6 @@ nouveau_name(struct drm_device *dev)
|
|||
return nouveau_platform_name(to_platform_device(dev->dev));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
nouveau_cli_work_ready(struct dma_fence *fence)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool ret = true;
|
||||
|
||||
dma_fence_lock_irqsave(fence, flags);
|
||||
if (!dma_fence_is_signaled_locked(fence))
|
||||
ret = false;
|
||||
dma_fence_unlock_irqrestore(fence, flags);
|
||||
|
||||
if (ret == true)
|
||||
dma_fence_put(fence);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
nouveau_cli_work(struct work_struct *w)
|
||||
{
|
||||
|
|
@ -176,9 +160,25 @@ nouveau_cli_work(struct work_struct *w)
|
|||
struct nouveau_cli_work *work, *wtmp;
|
||||
mutex_lock(&cli->lock);
|
||||
list_for_each_entry_safe(work, wtmp, &cli->worker, head) {
|
||||
if (!work->fence || nouveau_cli_work_ready(work->fence)) {
|
||||
struct dma_fence *fence = work->fence;
|
||||
|
||||
if (!fence || dma_fence_is_signaled(fence)) {
|
||||
if (fence) {
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Because fence can still be in the process of
|
||||
* processing the callback list, and the
|
||||
* callback references the work we are about to
|
||||
* free, we need to sync with the callback
|
||||
* processing before freeing the work.
|
||||
*/
|
||||
dma_fence_lock_irqsave(fence, flags);
|
||||
dma_fence_unlock_irqrestore(fence, flags);
|
||||
}
|
||||
list_del(&work->head);
|
||||
work->func(work);
|
||||
dma_fence_put(fence);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&cli->lock);
|
||||
|
|
|
|||
|
|
@ -313,11 +313,20 @@ nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem,
|
|||
rep->offset = nvbo->offset;
|
||||
if (vmm->vmm.object.oclass >= NVIF_CLASS_VMM_NV50 &&
|
||||
!nouveau_cli_uvmm(cli)) {
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
vma = nouveau_vma_find(nvbo, vmm);
|
||||
if (!vma)
|
||||
if (!vma) {
|
||||
ttm_bo_unreserve(&nvbo->bo);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rep->offset = vma->addr;
|
||||
ttm_bo_unreserve(&nvbo->bo);
|
||||
} else
|
||||
rep->offset = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ gv100_head_vblank_get(struct nvkm_head *head)
|
|||
nvkm_mask(device, 0x611d80 + (head->id * 4), 0x00000004, 0x00000004);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gv100_head_rgpos(struct nvkm_head *head, u16 *hline, u16 *vline)
|
||||
{
|
||||
struct nvkm_device *device = head->disp->engine.subdev.device;
|
||||
|
|
@ -263,7 +263,7 @@ gv100_head_rgpos(struct nvkm_head *head, u16 *hline, u16 *vline)
|
|||
*hline = nvkm_rd32(device, 0x616334 + hoff) & 0x0000ffff;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gv100_head_state(struct nvkm_head *head, struct nvkm_head_state *state)
|
||||
{
|
||||
struct nvkm_device *device = head->disp->engine.subdev.device;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ void gf119_head_rgclk(struct nvkm_head *, int);
|
|||
|
||||
int gv100_head_cnt(struct nvkm_disp *, unsigned long *);
|
||||
int gv100_head_new(struct nvkm_disp *, int id);
|
||||
void gv100_head_state(struct nvkm_head *head, struct nvkm_head_state *state);
|
||||
void gv100_head_rgpos(struct nvkm_head *head, u16 *hline, u16 *vline);
|
||||
|
||||
#define HEAD_MSG(h,l,f,a...) do { \
|
||||
struct nvkm_head *_h = (h); \
|
||||
|
|
|
|||
|
|
@ -625,14 +625,10 @@ r535_head_vblank_get(struct nvkm_head *head)
|
|||
nvkm_mask(device, 0x611d80 + (head->id * 4), 0x00000002, 0x00000002);
|
||||
}
|
||||
|
||||
static void
|
||||
r535_head_state(struct nvkm_head *head, struct nvkm_head_state *state)
|
||||
{
|
||||
}
|
||||
|
||||
static const struct nvkm_head_func
|
||||
r535_head = {
|
||||
.state = r535_head_state,
|
||||
.state = gv100_head_state,
|
||||
.rgpos = gv100_head_rgpos,
|
||||
.vblank_get = r535_head_vblank_get,
|
||||
.vblank_put = r535_head_vblank_put,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -231,29 +231,26 @@ nvkm_vmm_unref_sptes(struct nvkm_vmm_iter *it, struct nvkm_vmm_pt *pgt,
|
|||
* covered by a number of LPTEs, the LPTEs once again take
|
||||
* control over their address range.
|
||||
*
|
||||
* Determine how many LPTEs need to transition state.
|
||||
* Transition each LPTE individually as each may have a
|
||||
* different target state (sparse, invalid, or valid).
|
||||
*/
|
||||
pgt->pte[ptei].s.spte_valid = false;
|
||||
for (ptes = 1, ptei++; ptei < lpti; ptes++, ptei++) {
|
||||
for (ptei++; ptei < lpti; ptei++) {
|
||||
if (pgt->pte[ptei].s.sptes)
|
||||
break;
|
||||
pgt->pte[ptei].s.spte_valid = false;
|
||||
}
|
||||
|
||||
if (pgt->pte[pteb].s.sparse) {
|
||||
TRA(it, "LPTE %05x: U -> S %d PTEs", pteb, ptes);
|
||||
pair->func->sparse(vmm, pgt->pt[0], pteb, ptes);
|
||||
} else if (!pgt->pte[pteb].s.lpte_valid) {
|
||||
if (pair->func->invalid) {
|
||||
/* If the MMU supports it, restore the LPTE to the
|
||||
* INVALID state to tell the MMU there is no point
|
||||
* trying to fetch the corresponding SPTEs.
|
||||
*/
|
||||
TRA(it, "LPTE %05x: U -> I %d PTEs", pteb, ptes);
|
||||
pair->func->invalid(vmm, pgt->pt[0], pteb, ptes);
|
||||
while (pteb < ptei) {
|
||||
pgt->pte[pteb].s.spte_valid = false;
|
||||
if (pgt->pte[pteb].s.sparse) {
|
||||
TRA(it, "LPTE %05x: U -> S", pteb);
|
||||
pair->func->sparse(vmm, pgt->pt[0], pteb, 1);
|
||||
} else if (!pgt->pte[pteb].s.lpte_valid) {
|
||||
if (pair->func->invalid) {
|
||||
TRA(it, "LPTE %05x: U -> I", pteb);
|
||||
pair->func->invalid(vmm, pgt->pt[0], pteb, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TRA(it, "LPTE %05x: V %d PTEs", pteb, ptes);
|
||||
pteb++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ static const struct drm_bridge_funcs hdmi4_bridge_funcs = {
|
|||
.mode_set = hdmi4_bridge_mode_set,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = hdmi4_bridge_enable,
|
||||
.atomic_disable = hdmi4_bridge_disable,
|
||||
.hpd_notify = hdmi4_bridge_hpd_notify,
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ static const struct drm_bridge_funcs hdmi5_bridge_funcs = {
|
|||
.mode_set = hdmi5_bridge_mode_set,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = hdmi5_bridge_enable,
|
||||
.atomic_disable = hdmi5_bridge_disable,
|
||||
.edid_read = hdmi5_bridge_edid_read,
|
||||
|
|
|
|||
|
|
@ -2013,6 +2013,7 @@ static const struct edp_panel_entry edp_panels[] = {
|
|||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0964, &delay_200_500_e50, "NV133WUM-N61"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x096e, &delay_200_500_e50_po2e200, "NV116WHM-T07 V8.0"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0979, &delay_200_500_e50, "NV116WHM-N49 V8.0"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0985, &delay_200_500_e50, "NE160QDM-NY1"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x098d, &boe_nv110wtm_n61.delay, "NV110WTM-N61"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0993, &delay_200_500_e80, "NV116WHM-T14 V8.0"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x09ad, &delay_200_500_e80, "NV116WHM-N47"),
|
||||
|
|
@ -2115,6 +2116,7 @@ static const struct edp_panel_entry edp_panels[] = {
|
|||
|
||||
EDP_PANEL_ENTRY('E', 'T', 'C', 0x0000, &delay_50_500_e200_d200_po2e335, "LP079QX1-SP0V"),
|
||||
|
||||
EDP_PANEL_ENTRY('H', 'K', 'C', 0x1203, &delay_200_500_e80, "MB116AS01'3"),
|
||||
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d51, &delay_200_500_e200, "Unknown"),
|
||||
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5b, &delay_200_500_e200, "MB116AN01"),
|
||||
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5c, &delay_200_500_e200, "MB116AN01-2"),
|
||||
|
|
|
|||
|
|
@ -2357,20 +2357,20 @@ static int panthor_gpuva_sm_step_remap(struct drm_gpuva_op *op,
|
|||
*/
|
||||
panthor_fix_sparse_map_offset(op->remap.next, unmap_vma->flags);
|
||||
|
||||
/*
|
||||
* ARM IOMMU page table management code disallows partial unmaps of huge pages,
|
||||
* so when a partial unmap is requested, we must first unmap the entire huge
|
||||
* page and then remap the difference between the huge page minus the requested
|
||||
* unmap region. Calculating the right start address and range for the expanded
|
||||
* unmap operation is the responsibility of the following function.
|
||||
*/
|
||||
unmap_hugepage_align(&op->remap, &unmap_start, &unmap_range);
|
||||
|
||||
/* If the range changed, we might have to lock a wider region to guarantee
|
||||
* atomicity. panthor_vm_lock_region() bails out early if the new region
|
||||
* is already part of the locked region, so no need to do this check here.
|
||||
*/
|
||||
if (!unmap_vma->evicted) {
|
||||
/*
|
||||
* ARM IOMMU page table management code disallows partial unmaps of huge pages,
|
||||
* so when a partial unmap is requested, we must first unmap the entire huge
|
||||
* page and then remap the difference between the huge page minus the requested
|
||||
* unmap region. Calculating the right start address and range for the expanded
|
||||
* unmap operation is the responsibility of the following function.
|
||||
*/
|
||||
unmap_hugepage_align(&op->remap, &unmap_start, &unmap_range);
|
||||
|
||||
/* If the range changed, we might have to lock a wider region to guarantee
|
||||
* atomicity. panthor_vm_lock_region() bails out early if the new region
|
||||
* is already part of the locked region, so no need to do this check here.
|
||||
*/
|
||||
panthor_vm_lock_region(vm, unmap_start, unmap_range);
|
||||
panthor_vm_unmap_pages(vm, unmap_start, unmap_range);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -658,7 +658,7 @@ static const struct drm_bridge_funcs rcar_lvds_bridge_ops = {
|
|||
.destroy = rcar_lvds_destroy,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = rcar_lvds_atomic_enable,
|
||||
.atomic_disable = rcar_lvds_atomic_disable,
|
||||
.mode_fixup = rcar_lvds_mode_fixup,
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ static const struct drm_bridge_funcs rcar_mipi_dsi_bridge_ops = {
|
|||
.attach = rcar_mipi_dsi_attach,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = rcar_mipi_dsi_atomic_enable,
|
||||
.atomic_disable = rcar_mipi_dsi_atomic_disable,
|
||||
.mode_valid = rcar_mipi_dsi_bridge_mode_valid,
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ static const struct drm_bridge_funcs rzg2l_mipi_dsi_bridge_ops = {
|
|||
.attach = rzg2l_mipi_dsi_attach,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_pre_enable = rzg2l_mipi_dsi_atomic_pre_enable,
|
||||
.atomic_enable = rzg2l_mipi_dsi_atomic_enable,
|
||||
.atomic_disable = rzg2l_mipi_dsi_atomic_disable,
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@ static int cdn_dp_audio_mute_stream(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs cdn_dp_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.detect = cdn_dp_bridge_detect,
|
||||
.edid_read = cdn_dp_bridge_edid_read,
|
||||
.atomic_enable = cdn_dp_bridge_atomic_enable,
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ rk3066_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs rk3066_hdmi_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.atomic_enable = rk3066_hdmi_bridge_atomic_enable,
|
||||
.atomic_disable = rk3066_hdmi_bridge_atomic_disable,
|
||||
.detect = rk3066_hdmi_bridge_detect,
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static const
|
|||
struct drm_bridge_funcs rockchip_lvds_bridge_funcs = {
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
.get_modes = rockchip_lvds_bridge_get_modes,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ static const struct drm_bridge_funcs lvds_bridge_funcs = {
|
|||
.atomic_disable = lvds_atomic_disable,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_create_state = drm_atomic_helper_bridge_create_state,
|
||||
};
|
||||
|
||||
static int lvds_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -67,11 +67,8 @@ config DRM_SIMPLEDRM
|
|||
|
||||
This driver assumes that the display hardware has been initialized
|
||||
by the firmware or bootloader before the kernel boots. Scanout
|
||||
buffer, size, and display format must be provided via device tree,
|
||||
UEFI, VESA, etc.
|
||||
|
||||
On x86 BIOS or UEFI systems, you should also select SYSFB_SIMPLEFB
|
||||
to use UEFI and VESA framebuffers.
|
||||
buffer, size, and display format must be provided via device tree's
|
||||
simple-framebuffer node.
|
||||
|
||||
config DRM_VESADRM
|
||||
tristate "VESA framebuffer driver"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/of_address.h>
|
||||
#include <linux/of_clk.h>
|
||||
#include <linux/of_reserved_mem.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/platform_data/simplefb.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
|
|
@ -41,20 +42,6 @@
|
|||
* Helpers for simplefb
|
||||
*/
|
||||
|
||||
static int
|
||||
simplefb_get_validated_int(struct drm_device *dev, const char *name,
|
||||
uint32_t value)
|
||||
{
|
||||
return drm_sysfb_get_validated_int(dev, name, value, INT_MAX);
|
||||
}
|
||||
|
||||
static int
|
||||
simplefb_get_validated_int0(struct drm_device *dev, const char *name,
|
||||
uint32_t value)
|
||||
{
|
||||
return drm_sysfb_get_validated_int0(dev, name, value, INT_MAX);
|
||||
}
|
||||
|
||||
static const struct drm_format_info *
|
||||
simplefb_get_validated_format(struct drm_device *dev, const char *format_name)
|
||||
{
|
||||
|
|
@ -88,21 +75,21 @@ static int
|
|||
simplefb_get_width_pd(struct drm_device *dev,
|
||||
const struct simplefb_platform_data *pd)
|
||||
{
|
||||
return simplefb_get_validated_int0(dev, "width", pd->width);
|
||||
return drm_sysfb_get_validated_int0(dev, "width", pd->width, U16_MAX);
|
||||
}
|
||||
|
||||
static int
|
||||
simplefb_get_height_pd(struct drm_device *dev,
|
||||
const struct simplefb_platform_data *pd)
|
||||
{
|
||||
return simplefb_get_validated_int0(dev, "height", pd->height);
|
||||
return drm_sysfb_get_validated_int0(dev, "height", pd->height, U16_MAX);
|
||||
}
|
||||
|
||||
static int
|
||||
simplefb_get_stride_pd(struct drm_device *dev,
|
||||
const struct simplefb_platform_data *pd)
|
||||
{
|
||||
return simplefb_get_validated_int(dev, "stride", pd->stride);
|
||||
return drm_sysfb_get_validated_int(dev, "stride", pd->stride, INT_MAX);
|
||||
}
|
||||
|
||||
static const struct drm_format_info *
|
||||
|
|
@ -144,7 +131,7 @@ simplefb_get_width_of(struct drm_device *dev, struct device_node *of_node)
|
|||
|
||||
if (ret)
|
||||
return ret;
|
||||
return simplefb_get_validated_int0(dev, "width", width);
|
||||
return drm_sysfb_get_validated_int0(dev, "width", width, U16_MAX);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -155,7 +142,7 @@ simplefb_get_height_of(struct drm_device *dev, struct device_node *of_node)
|
|||
|
||||
if (ret)
|
||||
return ret;
|
||||
return simplefb_get_validated_int0(dev, "height", height);
|
||||
return drm_sysfb_get_validated_int0(dev, "height", height, U16_MAX);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -166,7 +153,7 @@ simplefb_get_stride_of(struct drm_device *dev, struct device_node *of_node)
|
|||
|
||||
if (ret)
|
||||
return ret;
|
||||
return simplefb_get_validated_int(dev, "stride", stride);
|
||||
return drm_sysfb_get_validated_int(dev, "stride", stride, INT_MAX);
|
||||
}
|
||||
|
||||
static const struct drm_format_info *
|
||||
|
|
@ -200,6 +187,39 @@ simplefb_get_memory_of(struct drm_device *dev, struct device_node *of_node)
|
|||
return res;
|
||||
}
|
||||
|
||||
static int __simplefb_get_panel_size_mm_of(struct drm_device *dev,
|
||||
struct device_node *of_panel_node,
|
||||
const char *name)
|
||||
{
|
||||
int ret;
|
||||
u32 value;
|
||||
|
||||
ret = of_property_read_u32(of_panel_node, name, &value);
|
||||
if (ret) {
|
||||
drm_dbg(dev, "simplefb: cannot parse panel %s: error %d\n",
|
||||
name, ret);
|
||||
return ret;
|
||||
} else if (value > U16_MAX) {
|
||||
drm_dbg(dev, "simplefb: panel %s of %u exceeds maximum value\n",
|
||||
name, value);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static int simplefb_get_panel_width_mm_of(struct drm_device *dev,
|
||||
struct device_node *of_panel_node)
|
||||
{
|
||||
return __simplefb_get_panel_size_mm_of(dev, of_panel_node, "width-mm");
|
||||
}
|
||||
|
||||
static int simplefb_get_panel_height_mm_of(struct drm_device *dev,
|
||||
struct device_node *of_panel_node)
|
||||
{
|
||||
return __simplefb_get_panel_size_mm_of(dev, of_panel_node, "height-mm");
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple Framebuffer device
|
||||
*/
|
||||
|
|
@ -601,9 +621,10 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
|
|||
struct drm_sysfb_device *sysfb;
|
||||
struct drm_device *dev;
|
||||
int width, height, stride;
|
||||
int width_mm = 0, height_mm = 0;
|
||||
u16 width_mm = 0, height_mm = 0;
|
||||
struct device_node *panel_node;
|
||||
const struct drm_format_info *format;
|
||||
u64 size;
|
||||
struct resource *res, *mem = NULL;
|
||||
struct drm_plane *primary_plane;
|
||||
struct drm_crtc *crtc;
|
||||
|
|
@ -665,8 +686,18 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
|
|||
return ERR_CAST(mem);
|
||||
panel_node = of_parse_phandle(of_node, "panel", 0);
|
||||
if (panel_node) {
|
||||
simplefb_read_u32_of(dev, panel_node, "width-mm", &width_mm);
|
||||
simplefb_read_u32_of(dev, panel_node, "height-mm", &height_mm);
|
||||
/*
|
||||
* Ignore errors from parsing the physical panel
|
||||
* size. Using the pre-initialized sizes of 0 will
|
||||
* make drm_sysfb_mode() calculate a default physical
|
||||
* size based on a resolution of 96 dpi.
|
||||
*/
|
||||
ret = simplefb_get_panel_width_mm_of(dev, panel_node);
|
||||
if (ret > 0)
|
||||
width_mm = ret;
|
||||
ret = simplefb_get_panel_height_mm_of(dev, panel_node);
|
||||
if (ret > 0)
|
||||
height_mm = ret;
|
||||
of_node_put(panel_node);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -674,9 +705,23 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
|
|||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
if (!stride) {
|
||||
stride = drm_format_info_min_pitch(format, 0, width);
|
||||
if (drm_WARN_ON(dev, !stride))
|
||||
u64 pitch = drm_format_info_min_pitch(format, 0, width);
|
||||
|
||||
if (drm_WARN_ON(dev, !pitch)) {
|
||||
return ERR_PTR(-EINVAL); /* driver bug */
|
||||
} else if (pitch > INT_MAX) {
|
||||
drm_warn(dev, "stride of %llu exceeds maximum\n", pitch);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
stride = pitch;
|
||||
}
|
||||
if (check_mul_overflow(height, stride, &size)) {
|
||||
drm_err(dev, "framebuffer size exceeds maximum\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
if (ALIGN(size, PAGE_SIZE) < PAGE_SIZE) {
|
||||
drm_err(dev, "page-aligned framebuffer exceeds maximum\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
sysfb->fb_mode = drm_sysfb_mode(width, height, width_mm, height_mm);
|
||||
|
|
@ -703,6 +748,13 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
|
|||
|
||||
drm_dbg(dev, "using system memory framebuffer at %pr\n", mem);
|
||||
|
||||
if (size > resource_size(mem)) {
|
||||
drm_err(dev,
|
||||
"framebuffer size of %llu exceeds memory range %pr\n",
|
||||
size, mem);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
screen_base = devm_memremap(dev->dev, mem->start, resource_size(mem), MEMREMAP_WC);
|
||||
if (IS_ERR(screen_base))
|
||||
return screen_base;
|
||||
|
|
@ -736,6 +788,13 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
|
|||
mem = res;
|
||||
}
|
||||
|
||||
if (size > resource_size(mem)) {
|
||||
drm_err(dev,
|
||||
"framebuffer size of %llu exceeds memory range %pr\n",
|
||||
size, mem);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
screen_base = devm_ioremap_wc(&pdev->dev, mem->start, resource_size(mem));
|
||||
if (!screen_base)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user