[Bug 98005] VCE dual instance encoding inconsistent since st/va: enable dual instances encode by sync surface
https://bugs.freedesktop.org/show_bug.cgi?id=98005 --- Comment #17 from Andy Furniss --- (In reply to Andy Furniss from comment #14) > Hi, > > Initial testing seems good for vbr bitrates More testing with longer transcoding type tests shows it is still possible to get low bitrates with the patches. Input is derived from blu-ray = 13 minutes = 2.6 gig so a bit hard to upload. Diference seen between gpu on perf and auto (uvd decode is faster with full clocks) gst-launch-1.0 -f filesrc location=in-24fps.mp4 ! qtdemux ! queue ! vaapidecode ! queue ! vaapih264enc rate-control=vbr bitrate=1 ! video/x-h264,profile=baseline ! filesink location=out24.264 -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/6bfc9b17/attachment.html>
[PATCH libdrm] tests: kms: fix shadowed declaration warning
There is no need to maintain the value in the shadowed variable from what I can see. Signed-off-by: Grazvydas Ignotas --- tests/kms/kms-universal-planes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c index d8e5fc4..89057bb 100644 --- a/tests/kms/kms-universal-planes.c +++ b/tests/kms/kms-universal-planes.c @@ -212,9 +212,9 @@ int main(int argc, char *argv[]) printf("Planes: %u\n", device->num_planes); for (i = 0; i < device->num_planes; i++) { - struct kms_plane *plane = device->planes[i]; const char *type = NULL; + plane = device->planes[i]; switch (plane->type) { case DRM_PLANE_TYPE_OVERLAY: type = "overlay"; -- 2.7.4
[PATCH libdrm] libdrm: random typo fixes
Just some trivial boring typo fixes all over the tree. READMEs and comments only. Signed-off-by: Grazvydas Ignotas --- README| 2 +- include/drm/README| 2 +- intel/intel_bufmgr_fake.c | 4 ++-- intel/intel_bufmgr_gem.c | 6 +++--- radeon/radeon_cs_gem.c| 10 +- radeon/radeon_surface.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README b/README index 603a1c1..7eeae38 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ libdrm - userspace library for drm This is libdrm, a userspace library for accessing the DRM, direct -rendering manager, on Linux, BSD and other operating systes that +rendering manager, on Linux, BSD and other operating systems that support the ioctl interface. The library provides wrapper functions for the ioctls to avoid exposing the kernel interface directly, and for chipsets with drm memory manager, support for tracking relocations diff --git a/include/drm/README b/include/drm/README index c3292f3..a50b02c 100644 --- a/include/drm/README +++ b/include/drm/README @@ -89,7 +89,7 @@ Nearly all headers: Status: Trivial. Most UMS headers: - - Not using fixed size interers - compat ioctls are broken. + - Not using fixed size integers - compat ioctls are broken. Status: ? Promote to fixed size ints, which match the current (32bit) ones. diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c index 24b3732..641df6a 100644 --- a/intel/intel_bufmgr_fake.c +++ b/intel/intel_bufmgr_fake.c @@ -737,7 +737,7 @@ drm_intel_bufmgr_fake_wait_idle(drm_intel_bufmgr_fake *bufmgr_fake) /** * Wait for rendering to a buffer to complete. * - * It is assumed that the bathcbuffer which performed the rendering included + * It is assumed that the batchbuffer which performed the rendering included * the necessary flushing. */ static void @@ -1200,7 +1200,7 @@ static int assert(!(bo_fake->flags & (BM_NO_BACKING_STORE | BM_PINNED))); /* Actually, should be able to just wait for a fence on the -* mmory, hich we would be tracking when we free it. Waiting +* memory, which we would be tracking when we free it. Waiting * for idle is a sufficiently large hammer for now. */ drm_intel_bufmgr_fake_wait_idle(bufmgr_fake); diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 15c79b3..612b125 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -256,7 +256,7 @@ struct _drm_intel_bo_gem { * Boolean of whether the GPU is definitely not accessing the buffer. * * This is only valid when reusable, since non-reusable -* buffers are those that have been shared wth other +* buffers are those that have been shared with other * processes, so we don't know their state. */ bool idle; @@ -294,7 +294,7 @@ struct _drm_intel_bo_gem { */ int reloc_tree_fences; - /** Flags that we may need to do the SW_FINSIH ioctl on unmap. */ + /** Flags that we may need to do the SW_FINISH ioctl on unmap. */ bool mapped_cpu_write; }; @@ -1719,7 +1719,7 @@ static int drm_intel_gem_bo_unmap(drm_intel_bo *bo) } /* We need to unmap after every innovation as we cannot track -* an open vma for every bo as that will exhaasut the system +* an open vma for every bo as that will exhaust the system * limits and cause later failures. */ if (--bo_gem->map_count == 0) { diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c index 23f33af..f3dccb6 100644 --- a/radeon/radeon_cs_gem.c +++ b/radeon/radeon_cs_gem.c @@ -189,7 +189,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs, /* check domains */ if ((read_domain && write_domain) || (!read_domain && !write_domain)) { /* in one CS a bo can only be in read or write domain but not - * in read & write domain at the same sime + * in read & write domain at the same time */ return -EINVAL; } @@ -242,7 +242,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs, } /* new relocation */ if (csg->base.crelocs >= csg->nrelocs) { -/* allocate more memory (TODO: should use a slab allocatore maybe) */ +/* allocate more memory (TODO: should use a slab allocator maybe) */ uint32_t *tmp, size; size = ((csg->nrelocs + 1) * sizeof(struct radeon_bo*)); tmp = (uint32_t*)realloc(csg->relocs_bo, size); @@ -268,7 +268,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs, reloc->flags = flags; csg->chunks[1].length_dw += RELOC_SIZE; radeon_bo_ref(bo); -/* bo might be referenced from another context so have to use atomic opertions */ +/* bo might be referenced from another context so have to use atomic operations */ atomic_add((atomic_t *
[Bug 98776] [regression] Rendering glitches in Life Is Strange
https://bugs.freedesktop.org/show_bug.cgi?id=98776 --- Comment #4 from Arek RuÅniak --- Daniel I can't reproduce this on verde/polaris probably this can be HW specific issue. And I can't replay your trace because apitrace crashes with: 4108417: warning: region 0x7f26ce079000-0x7f26ce07a188 intersects existing region 0x7f26ce07a000-0x7f26ce07a120 glretrace: /build/apitrace/src/apitrace-7.1/retrace/retrace_swizzle.cpp:166: std::map::iterator retrace::lookupRegion(long long unsigned int): Assertion `contains(it, address)' failed. apitrace: warning: caught signal 6 4108425: error: caught an unhandled exception glretrace+0x234eec /usr/lib/libpthread.so.0+0x1107f /usr/lib/libc.so.6: gsignal+0xcf /usr/lib/libc.so.6: abort+0x169 /usr/lib/libc.so.6+0x2bea6 /usr/lib/libc.so.6: __assert_fail+0x41 glretrace+0xd9ef glretrace+0xe7cb glretrace+0xdb15 glretrace+0xd7e8 glretrace+0xc48b glretrace+0xcbe9 glretrace+0xce91 /usr/lib/libpthread.so.0+0x7453 /usr/lib/libc.so.6: clone+0x5e ? apitrace: info: taking default action for signal 6 Aborted (core dumped) -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/fd34ac8f/attachment.html>
[Bug 98784] Talos Principle rendering flickering garbage on start instead of its logo and loading squares
https://bugs.freedesktop.org/show_bug.cgi?id=98784 --- Comment #6 from Vedran MiletiÄ --- Further findings: similar flickering occurs in Talos Principle latest public beta (not in stable) when switching GPU Speed from High to Ultra, after clicking Apply. The setting gets applied after a while, as expected. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/0d9e41a7/attachment.html>
[Bug 98005] VCE dual instance encoding inconsistent since st/va: enable dual instances encode by sync surface
https://bugs.freedesktop.org/show_bug.cgi?id=98005 Andy Furniss changed: What|Removed |Added Attachment #127943|0 |1 is obsolete|| --- Comment #16 from Andy Furniss --- Created attachment 128084 --> https://bugs.freedesktop.org/attachment.cgi?id=128084&action=edit ntsc rate fix, seems solid but not pretty. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/60e99834/attachment-0001.html>
[Bug 98005] VCE dual instance encoding inconsistent since st/va: enable dual instances encode by sync surface
https://bugs.freedesktop.org/show_bug.cgi?id=98005 --- Comment #15 from Andy Furniss --- (In reply to Boyuan Zhang from comment #13) > In the meantime, I will look at the ntsc framerate. On this I looked what gstreamer and avconv were sending and both do send the denominator so a v2 (horrible looking) patch attached which tests OK for a variety of inputs. I guess there's a more elegant way, but it works. Maybe over paranoid trying to avoid division by 0 in this case, but I notice that the gop patch can get one if the user asks for -g 0 with avconv. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/7454a104/attachment.html>
[Bug 98785] Talos Principle causes GPU faults when rendering main menu animation
https://bugs.freedesktop.org/show_bug.cgi?id=98785 --- Comment #1 from Vedran MiletiÄ --- Related LLVM bug: https://llvm.org/bugs/show_bug.cgi?id=31019 -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/674d083b/attachment.html>
[Bug 98784] Talos Principle rendering flickering garbage on start instead of its logo and loading squares
https://bugs.freedesktop.org/show_bug.cgi?id=98784 --- Comment #5 from Vedran MiletiÄ --- (In reply to Andy Furniss from comment #4) > (In reply to Vedran MiletiÄ from comment #0) > > Created attachment 128072 [details] > > Talos rendering in place of Croteam logo > > > > I'm using Mesa and LLVM git snapshots on kernel 4.8.8 on Tonga (R9 380X). > > Maybe something else, but llvm master does currently have an issue. You > could try llvm with the commit reverted. > > https://llvm.org/bugs/show_bug.cgi?id=31019 This actually fixes bug 98783 and bug 98785. Just not this one. :-D -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/3c8514c0/attachment.html>
[PATCH v6 0/5] drm: sun8i: Add DE2 HDMI video support
This patchset series adds HDMI video support to the Allwinner sun8i SoCs which include the display engine 2 (DE2). The driver contains the code for the A83T and H3, but it could be used/extended for other SoCs as the A64, H2 and H5. v6: - remove audio support (other patchset to come) - use DRM modeset data for HDMI configuration (thanks to Jernej Škrabec) - more meaningfull register names - use a mutex for DE I/O protection - merge DE and plane into one file - don't activate the video hardware when video not started (Maxime Ripard) - remove 'type = "video" in DT graph ports (Rob Herring) - change the I/O accesses by #define instead of struct (Maxime Ripard, André Przywara) - remove pm functions (Maxime Ripard) - set the pll-de/de clocks in the DT (Maxime Ripard) - use platform_get_irq instead of irq_of_parse_and_map (Maxime Ripard) - rename sunxi to sun8i (Maxime Ripard) - fix coding style errors (Maxime Ripard) - subclass the drm structure in private data (Daniel Vetter) - move drm_dev_register at end of init (Daniel Vetter) v5: - add overlay plane - add audio support - add support for the A83T - add back the HDMI driver - many bug fixes v4: - drivers/clk/sunxi/Makefile was missing (Emil Velikov) v3: - add the hardware cursor - simplify and fix the DE2 init sequences - generation for all SUNXI SoCs (Andre Przywara) v2: - remove the HDMI driver - remarks from Chen-Yu Tsai and Russell King - DT documentation added Jean-Francois Moine (5): drm: sun8i: Add a basic DRM driver for Allwinner DE2 drm: sunxi: add HDMI video support to A83T and H3 ARM: dts: sun8i-h3: add HDMI video nodes ARM: dts: sun8i-h3: Add HDMI video to the Banana Pi M2+ ARM: dts: sun8i-h3: Add HDMI video to the Orange PI 2 .../devicetree/bindings/display/sunxi/hdmi.txt | 53 ++ .../bindings/display/sunxi/sun8i-de2.txt | 83 ++ arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts| 13 + arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 13 + arch/arm/boot/dts/sun8i-h3.dtsi| 51 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sun8i/Kconfig | 26 + drivers/gpu/drm/sun8i/Makefile | 9 + drivers/gpu/drm/sun8i/de2_crtc.c | 440 +++ drivers/gpu/drm/sun8i/de2_crtc.h | 50 ++ drivers/gpu/drm/sun8i/de2_drm.h| 48 ++ drivers/gpu/drm/sun8i/de2_drv.c| 379 ++ drivers/gpu/drm/sun8i/de2_hdmi.c | 394 ++ drivers/gpu/drm/sun8i/de2_hdmi.h | 51 ++ drivers/gpu/drm/sun8i/de2_hdmi_io.c| 839 + drivers/gpu/drm/sun8i/de2_plane.c | 712 + 17 files changed, 3164 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/sunxi/hdmi.txt create mode 100644 Documentation/devicetree/bindings/display/sunxi/sun8i-de2.txt create mode 100644 drivers/gpu/drm/sun8i/Kconfig create mode 100644 drivers/gpu/drm/sun8i/Makefile create mode 100644 drivers/gpu/drm/sun8i/de2_crtc.c create mode 100644 drivers/gpu/drm/sun8i/de2_crtc.h create mode 100644 drivers/gpu/drm/sun8i/de2_drm.h create mode 100644 drivers/gpu/drm/sun8i/de2_drv.c create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi.c create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi.h create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi_io.c create mode 100644 drivers/gpu/drm/sun8i/de2_plane.c -- 2.10.2
[PATCH v6 5/5] ARM: dts: sun8i-h3: Add HDMI video to the Orange PI 2
Signed-off-by: Jean-Francois Moine --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts index 047e9e1..9ecc6f1 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts @@ -56,6 +56,7 @@ serial0 = &uart0; /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ ethernet1 = &rtl8189; + lcd0 = &lcd0; }; chosen { @@ -105,16 +106,28 @@ }; }; +&de { + status = "okay"; +}; + &ehci1 { status = "okay"; }; +&hdmi { + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&ir_pins_a>; status = "okay"; }; +&lcd0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -- 2.10.2
[PATCH v6 4/5] ARM: dts: sun8i-h3: Add HDMI video to the Banana Pi M2+
Signed-off-by: Jean-Francois Moine --- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts index c0c49dd..4b5baae 100644 --- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts @@ -55,6 +55,7 @@ aliases { serial0 = &uart0; serial1 = &uart1; + lcd0 = &lcd0; }; chosen { @@ -93,6 +94,10 @@ }; }; +&de { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -101,12 +106,20 @@ status = "okay"; }; +&hdmi { + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&ir_pins_a>; status = "okay"; }; +&lcd0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -- 2.10.2
[PATCH v6 3/5] ARM: dts: sun8i-h3: add HDMI video nodes
Signed-off-by: Jean-Francois Moine --- arch/arm/boot/dts/sun8i-h3.dtsi | 51 + 1 file changed, 51 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 416b825..7c6b1d5 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi @@ -140,6 +140,16 @@ #size-cells = <1>; ranges; + de: de-controller at 0100 { + compatible = "allwinner,sun8i-h3-display-engine"; + reg = <0x0100 0x40>; + clocks = <&ccu CLK_BUS_DE>, <&ccu CLK_DE>; + clock-names = "bus", "clock"; + resets = <&ccu RST_BUS_DE>; + ports = <&lcd0_p>; + status = "disabled"; + }; + dma: dma-controller at 01c02000 { compatible = "allwinner,sun8i-h3-dma"; reg = <0x01c02000 0x1000>; @@ -149,6 +159,23 @@ #dma-cells = <1>; }; + lcd0: lcd-controller at 01c0c000 { + compatible = "allwinner,sun8i-a83t-tcon"; + reg = <0x01c0c000 0x400>; + clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; + clock-names = "bus", "clock"; + resets = <&ccu RST_BUS_TCON0>; + interrupts = ; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + lcd0_p: port { + lcd0_hdmi: endpoint { + remote-endpoint = <&hdmi_lcd0>; + }; + }; + }; + mmc0: mmc at 01c0f000 { compatible = "allwinner,sun7i-a20-mmc"; reg = <0x01c0f000 0x1000>; @@ -314,6 +341,11 @@ clock-names = "hosc", "losc"; #clock-cells = <1>; #reset-cells = <1>; + + assigned-clocks = <&ccu CLK_PLL_DE>, + <&ccu CLK_DE>; + assigned-clock-rates = <86400>, + <43200>; }; pio: pinctrl at 01c20800 { @@ -564,6 +596,25 @@ interrupts = ; }; + hdmi: hdmi at 01ee { + compatible = "allwinner,sun8i-h3-hdmi"; + reg = <0x01ee 0x2>; + clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI>, +<&ccu CLK_HDMI_DDC>; + clock-names = "bus", "clock", "ddc-clock"; + resets = <&ccu RST_BUS_HDMI0>, <&ccu RST_BUS_HDMI1>; + reset-names = "hdmi0", "hdmi1"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + port at 0 { /* video */ + reg = <0>; + hdmi_lcd0: endpoint { + remote-endpoint = <&lcd0_hdmi>; + }; + }; + }; + rtc: rtc at 01f0 { compatible = "allwinner,sun6i-a31-rtc"; reg = <0x01f0 0x54>; -- 2.10.2
[Bug 98795] Rendering regression in radeonsi running mad max
https://bugs.freedesktop.org/show_bug.cgi?id=98795 Freyr Ãlafsson changed: What|Removed |Added CC||gnarlin at gmail.com URL||https://www.youtube.com/wat ||ch?v=lo3o8ekJWHI -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/cfd01d94/attachment.html>
[Bug 98795] Rendering regression in radeonsi running mad max
https://bugs.freedesktop.org/show_bug.cgi?id=98795 Bug ID: 98795 Summary: Rendering regression in radeonsi running mad max Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel at lists.freedesktop.org Reporter: gnarlin at gmail.com QA Contact: dri-devel at lists.freedesktop.org Some characters (including main characters) face casts a large blinding white halo on high settings and flickering rgb colours on low settings with most graphics options turned off after updating mesa using padoka ppa on Ubuntu 16.10 on 20.11.2016 with a Sapphire Radeon RX 480 8GB. See video: https://www.youtube.com/watch?v=lo3o8ekJWHI Game used to run perfectly before that date. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/0cfaf69c/attachment.html>
[Bug 98743] Incorrect colormapping in Verdun game
https://bugs.freedesktop.org/show_bug.cgi?id=98743 --- Comment #2 from KiЯei --- The issue just appeared in the game menu area so I uploaded a trace of that instead of in-game (where it looks different, but generates a trace of over 3GB and trimming seems to be broken) https://transfer.sh/9d8BT/verdun.tar.xz -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/2123814c/attachment.html>
[Bug 98761] [regression][radeonsi][polaris]"radeonsi: set IF_THRESHOLD to 3" breaks Witcher2's ground
https://bugs.freedesktop.org/show_bug.cgi?id=98761 --- Comment #10 from Arek RuÅniak --- Nicolai, I don't want to bisect llvm I really hate it but i've tried r286757 & r286827 and problem is somewhere between. So you have right i believe. And still can't reproduce this on hd7770 (verde). -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/9b0f7fe6/attachment-0001.html>
[PATCH v6 2/5] drm: sun8i: add HDMI video support to A83T and H3
This patch adds a HDMI video driver to the Allwinner's SoCs A83T and H3. Signed-off-by: Jean-Francois Moine --- .../devicetree/bindings/display/sunxi/hdmi.txt | 53 ++ drivers/gpu/drm/sun8i/Kconfig | 7 + drivers/gpu/drm/sun8i/Makefile | 2 + drivers/gpu/drm/sun8i/de2_hdmi.c | 394 ++ drivers/gpu/drm/sun8i/de2_hdmi.h | 51 ++ drivers/gpu/drm/sun8i/de2_hdmi_io.c| 839 + 6 files changed, 1346 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/sunxi/hdmi.txt create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi.c create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi.h create mode 100644 drivers/gpu/drm/sun8i/de2_hdmi_io.c diff --git a/Documentation/devicetree/bindings/display/sunxi/hdmi.txt b/Documentation/devicetree/bindings/display/sunxi/hdmi.txt new file mode 100644 index 000..85709ab --- /dev/null +++ b/Documentation/devicetree/bindings/display/sunxi/hdmi.txt @@ -0,0 +1,53 @@ +Allwinner HDMI Transmitter +== + +The Allwinner HDMI transmitters are included in the SoCs. +They support audio and video. + +Required properties: + - #address-cells : should be <1> + - #size-cells : should be <0> + - compatible : should be one of + "allwinner,sun8i-a83t-hdmi" + "allwinner,sun8i-h3-hdmi" + - clocks : phandles to the HDMI clocks as described in + Documentation/devicetree/bindings/clock/clock-bindings.txt + - clock-names : must be + "gate" : bus gate + "clock" : streaming clock + "ddc-clock" : DDC clock + - resets : One or two phandles to the HDMI resets + - reset-names : when 2 phandles, must be + "hdmi0" and "hdmi1" + +Required nodes: + - port: Audio and video input port nodes with endpoint definitions + as defined in Documentation/devicetree/bindings/graph.txt. + port at 0 is video and port at 1 is audio. + +Example: + + hdmi: hdmi at 01ee { + compatible = "allwinner,sun8i-a83t-hdmi"; + reg = <0x01ee 0x2>; + clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI>, +<&ccu CLK_HDMI_DDC>; + clock-names = "gate", "clock", "ddc-clock"; + resets = <&ccu RST_HDMI0>, <&ccu RST_HDMI1>; + reset-names = "hdmi0", "hdmi1"; + ... + #address-cells = <1>; + #size-cells = <0>; + port at 0 { /* video */ + reg = <0>; + hdmi_lcd1: endpoint { + remote-endpoint = <&lcd1_hdmi>; + }; + }; + port at 1 { /* audio */ + reg = <1>; + hdmi_i2s2: endpoint { + remote-endpoint = <&i2s2_hdmi>; + }; + }; + }; diff --git a/drivers/gpu/drm/sun8i/Kconfig b/drivers/gpu/drm/sun8i/Kconfig index 6940895..5c4607b 100644 --- a/drivers/gpu/drm/sun8i/Kconfig +++ b/drivers/gpu/drm/sun8i/Kconfig @@ -17,3 +17,10 @@ config DRM_SUN8I_DE2 Choose this option if your Allwinner chipset has the DE2 interface as the A64, A83T and H3. If M is selected the module will be called sun8i-de2-drm. + +config DRM_SUN8I_DE2_HDMI + tristate "Support for DE2 HDMI" + depends on DRM_SUN8I_DE2 + help + Choose this option if you use want HDMI on DE2. + If M is selected the module will be called sun8i-de2-hdmi. diff --git a/drivers/gpu/drm/sun8i/Makefile b/drivers/gpu/drm/sun8i/Makefile index f107919..6ba97c2 100644 --- a/drivers/gpu/drm/sun8i/Makefile +++ b/drivers/gpu/drm/sun8i/Makefile @@ -3,5 +3,7 @@ # sun8i-de2-drm-objs := de2_drv.o de2_crtc.o de2_plane.o +sun8i-de2-hdmi-objs := de2_hdmi.o de2_hdmi_io.o obj-$(CONFIG_DRM_SUN8I_DE2) += sun8i-de2-drm.o +obj-$(CONFIG_DRM_SUN8I_DE2_HDMI) += sun8i-de2-hdmi.o diff --git a/drivers/gpu/drm/sun8i/de2_hdmi.c b/drivers/gpu/drm/sun8i/de2_hdmi.c new file mode 100644 index 000..9898a12 --- /dev/null +++ b/drivers/gpu/drm/sun8i/de2_hdmi.c @@ -0,0 +1,394 @@ +/* + * Allwinner DRM driver - HDMI + * + * Copyright (C) 2016 Jean-Francois Moine + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "de2_hdmi.h" + +static const struct of_device_id de2_hdmi_dt_ids[] = { + { .compatible = "allwinner,sun8i-a83t-hdmi", + .data = (void *) SOC_A83T }, + { .compatible = "allwinner,sun8i-h
[PATCH v6 1/5] drm: sun8i: Add a basic DRM driver for Allwinner DE2
Allwinner's recent SoCs, as A64, A83T and H3, contain a new display engine, DE2. This patch adds a DRM video driver for this device. Signed-off-by: Jean-Francois Moine --- .../bindings/display/sunxi/sun8i-de2.txt | 83 +++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sun8i/Kconfig | 19 + drivers/gpu/drm/sun8i/Makefile | 7 + drivers/gpu/drm/sun8i/de2_crtc.c | 440 + drivers/gpu/drm/sun8i/de2_crtc.h | 50 ++ drivers/gpu/drm/sun8i/de2_drm.h| 48 ++ drivers/gpu/drm/sun8i/de2_drv.c| 379 +++ drivers/gpu/drm/sun8i/de2_plane.c | 712 + 10 files changed, 1741 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/sunxi/sun8i-de2.txt create mode 100644 drivers/gpu/drm/sun8i/Kconfig create mode 100644 drivers/gpu/drm/sun8i/Makefile create mode 100644 drivers/gpu/drm/sun8i/de2_crtc.c create mode 100644 drivers/gpu/drm/sun8i/de2_crtc.h create mode 100644 drivers/gpu/drm/sun8i/de2_drm.h create mode 100644 drivers/gpu/drm/sun8i/de2_drv.c create mode 100644 drivers/gpu/drm/sun8i/de2_plane.c diff --git a/Documentation/devicetree/bindings/display/sunxi/sun8i-de2.txt b/Documentation/devicetree/bindings/display/sunxi/sun8i-de2.txt new file mode 100644 index 000..b9edd4b --- /dev/null +++ b/Documentation/devicetree/bindings/display/sunxi/sun8i-de2.txt @@ -0,0 +1,83 @@ +Allwinner sun8i Display Engine 2 subsystem +== + +The Allwinner DE2 subsystem contains a display controller (DE2), +one or two LCD controllers (TCON) and their external interfaces. + +Display controller +== + +Required properties: + +- compatible: value should be one of the following + "allwinner,sun8i-a83t-display-engine" + "allwinner,sun8i-h3-display-engine" + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: must contain + "gate": DE bus gate + "clock": DE clock + +- resets: phandle to the reset of the device + +- ports: phandle's to the LCD ports + +LCD controller +== + +Required properties: + +- compatible: should be + "allwinner,sun8i-a83t-tcon" + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: must contain + "gate": TCON bus gate + "clock": TCON pixel clock + +- resets: phandle to the reset of the device + +- port: port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + + de: de-controller at 0100 { + compatible = "allwinner,sun8i-h3-display-engine"; + ... + clocks = <&&ccu CLK_BUS_DE>, <&ccu CLK_DE>; + clock-names = "gate", "clock"; + resets = <&ccu RST_BUS_DE>; + ports = <&lcd0_p>; + }; + + lcd0: lcd-controller at 01c0c000 { + compatible = "allwinner,sun8i-a83t-tcon"; + ... + clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; + clock-names = "gate", "clock"; + resets = <&ccu RST_BUS_TCON0>; + #address-cells = <1>; + #size-cells = <0>; + lcd0_p: port { + lcd0_ep: endpoint { + remote-endpoint = <&hdmi_ep>; + }; + }; + }; + + hdmi: hdmi at 01ee { + ... + #address-cells = <1>; + #size-cells = <0>; + port { + hdmi_ep: endpoint { + remote-endpoint = <&lcd0_ep>; + }; + }; + }; + diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 95fc041..bb1bfbc 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -202,6 +202,8 @@ source "drivers/gpu/drm/shmobile/Kconfig" source "drivers/gpu/drm/sun4i/Kconfig" +source "drivers/gpu/drm/sun8i/Kconfig" + source "drivers/gpu/drm/omapdrm/Kconfig" source "drivers/gpu/drm/tilcdc/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 883f3e7..3e1eaa0 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -72,6 +72,7 @@ obj-$(CONFIG_DRM_RCAR_DU) += rcar-du/ obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ obj-y += omapdrm/ obj-$(CONFIG_DRM_SUN4I) += sun4i/ +obj-$(CONFIG_DRM_SUN8I) += sun8i/ obj-y += tilcdc/ obj-$(CONFIG_DRM_QXL) += qxl/ obj-$(CONFIG_DRM_BOCHS) += bochs/ diff --git a/drivers/gpu/drm/sun8i/Kconfig b/drivers/gpu/drm/sun8i/Kconfig new file
[PATCH 36/37] drm: Add mode_config .get_format_info() hook
Hi Ville, Thank you for the patch. On Friday 18 Nov 2016 21:53:12 ville.syrjala at linux.intel.com wrote: > From: Ville Syrjälä > > Allow drivers to return a custom drm_format_info structure for special > fb layouts. We'll use this for the compression control surface in i915. > > Cc: Ben Widawsky > Cc: intel-gfx at lists.freedesktop.org > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- > drivers/gpu/drm/drm_fourcc.c | 25 + > drivers/gpu/drm/drm_framebuffer.c| 9 +++-- > drivers/gpu/drm/drm_modeset_helper.c | 2 +- > include/drm/drm_fourcc.h | 6 ++ > include/drm/drm_mode_config.h| 15 +++ > 6 files changed, 55 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c > b/drivers/gpu/drm/drm_fb_cma_helper.c index aab4465307ed..d7f8876cf5e9 > 100644 > --- a/drivers/gpu/drm/drm_fb_cma_helper.c > +++ b/drivers/gpu/drm/drm_fb_cma_helper.c > @@ -186,7 +186,7 @@ struct drm_framebuffer > *drm_fb_cma_create_with_funcs(struct drm_device *dev, int ret; > int i; > > - info = drm_format_info(mode_cmd->pixel_format); > + info = drm_get_format_info(dev, mode_cmd); > if (!info) > return ERR_PTR(-EINVAL); > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > index 90d2cc8da8eb..7cfaee689f0c 100644 > --- a/drivers/gpu/drm/drm_fourcc.c > +++ b/drivers/gpu/drm/drm_fourcc.c > @@ -199,6 +199,31 @@ const struct drm_format_info *drm_format_info(u32 > format) EXPORT_SYMBOL(drm_format_info); > > /** > + * drm_format_info - query information for a given framebuffer > configuration I assume you meant drm_get_format_info() > + * @dev: DRM device Do we need the dev pointer ? > + * @mode_cmd: metadata from the userspace fb creation request > + * > + * Returns: > + * The instance of struct drm_format_info that describes the pixel format, > or > + * NULL if the format is unsupported. It would be useful to document how this function differs from drm_format_info(). I also wonder whether it would make sense to completely replace drm_format_info() to avoid keeping two separate but very similar functions. > + */ > +const struct drm_format_info * > +drm_get_format_info(struct drm_device *dev, > + const struct drm_mode_fb_cmd2 *mode_cmd) > +{ > + const struct drm_format_info *info = NULL; > + > + if (dev->mode_config.funcs->get_format_info) > + info = dev->mode_config.funcs->get_format_info(dev, mode_cmd); > + > + if (!info) > + info = drm_format_info(mode_cmd->pixel_format); > + > + return info; > +} > +EXPORT_SYMBOL(drm_get_format_info); > + > +/** > * drm_format_num_planes - get the number of planes for format > * @format: pixel format (DRM_FORMAT_*) > * > diff --git a/drivers/gpu/drm/drm_framebuffer.c > b/drivers/gpu/drm/drm_framebuffer.c index 94ddab41f24f..292930a5dcc2 100644 > --- a/drivers/gpu/drm/drm_framebuffer.c > +++ b/drivers/gpu/drm/drm_framebuffer.c > @@ -126,11 +126,13 @@ int drm_mode_addfb(struct drm_device *dev, > return 0; > } > > -static int framebuffer_check(const struct drm_mode_fb_cmd2 *r) > +static int framebuffer_check(struct drm_device *dev, > + const struct drm_mode_fb_cmd2 *r) > { > const struct drm_format_info *info; > int i; > > + /* check if the format is supported at all */ > info = __drm_format_info(r->pixel_format & ~DRM_FORMAT_BIG_ENDIAN); > if (!info) { > struct drm_format_name_buf format_name; > @@ -140,6 +142,9 @@ static int framebuffer_check(const struct > drm_mode_fb_cmd2 *r) return -EINVAL; > } > > + /* now let the driver pick its own format info */ > + info = drm_get_format_info(dev, r); > + > if (r->width == 0 || r->width % info->hsub) { > DRM_DEBUG_KMS("bad framebuffer width %u\n", r->width); > return -EINVAL; > @@ -263,7 +268,7 @@ drm_internal_framebuffer_create(struct drm_device *dev, > return ERR_PTR(-EINVAL); > } > > - ret = framebuffer_check(r); > + ret = framebuffer_check(dev, r); > if (ret) > return ERR_PTR(ret); > > diff --git a/drivers/gpu/drm/drm_modeset_helper.c > b/drivers/gpu/drm/drm_modeset_helper.c index 5b051859b8d3..f78df06a940d > 100644 > --- a/drivers/gpu/drm/drm_modeset_helper.c > +++ b/drivers/gpu/drm/drm_modeset_helper.c > @@ -75,7 +75,7 @@ void drm_helper_mode_fill_fb_struct(struct drm_device > *dev, int i; > > fb->dev = dev; > - fb->format = drm_format_info(mode_cmd->pixel_format); > + fb->format = drm_get_format_info(dev, mode_cmd); > fb->width = mode_cmd->width; > fb->height = mode_cmd->height; > for (i = 0; i < 4; i++) { > diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h > index fcc08da850c8..6942e84b6edd 100644 > --- a/include/drm/drm_fourcc.h > +++ b/include/drm/drm_fourc
[Bug 98778] 3D is not working.
https://bugs.freedesktop.org/show_bug.cgi?id=98778 Michel Dänzer changed: What|Removed |Added Component|Driver/AMDgpu |Drivers/Gallium/radeonsi Assignee|xorg-driver-ati at lists.x.org |dri-devel at lists.freedesktop ||.org Product|xorg|Mesa QA Contact|xorg-team at lists.x.org |dri-devel at lists.freedesktop ||.org --- Comment #1 from Michel Dänzer --- Looks like you need a newer version of Mesa. In particular, only Mesa 13 or newer is compatible with LLVM 3.9. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161120/98847400/attachment.html>