Linux kernel 5.10 on XU3/4

Test and fix the Kernel 5.4 features
Post Reply
MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Linux kernel 5.10 on XU3/4

Post by MastaG »

Hi there,

I'm trying to build Linux 5.10 for the XU4 and it works great, however as panfrost still has some quirks (artifacts) I'd like to keep using the old wayland/gbm blob from ARM.
So I'm trying to port the mali driver to the kernel.

With some small changes (mostly around timestamps and some tmp= functions) I can get it to build.
Except for the below code in: drivers/gpu/arm/midgard/mali_kbase_softjobs.c

Code: Select all

#ifdef CONFIG_DMA_SHARED_BUFFER
        case KBASE_MEM_TYPE_IMPORTED_UMM: {
                struct dma_buf *dma_buf = gpu_alloc->imported.umm.dma_buf;

                KBASE_DEBUG_ASSERT(dma_buf != NULL);
                if (dma_buf->size > buf_data->nr_extres_pages * PAGE_SIZE)
                        dev_warn(kctx->kbdev->dev, "External resources buffer size mismatch");

                dma_to_copy = min(dma_buf->size,
                        (size_t)(buf_data->nr_extres_pages * PAGE_SIZE));
                ret = dma_buf_begin_cpu_access(dma_buf,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) && !defined(CONFIG_CHROMEOS)
                                0, dma_to_copy,
#endif
                                DMA_FROM_DEVICE);
                if (ret)
                        goto out_unlock;

                for (i = 0; i < dma_to_copy/PAGE_SIZE; i++) {

                        void *extres_page = dma_buf_kmap(dma_buf, i);

                        if (extres_page)
                                kbase_mem_copy_from_extres_page(kctx,
                                                extres_page, pages,
                                                buf_data->nr_pages,
                                                &target_page_nr,
                                                offset, &to_copy);

                        dma_buf_kunmap(dma_buf, i, extres_page);
                        if (target_page_nr >= buf_data->nr_pages)
                                break;
                }
                dma_buf_end_cpu_access(dma_buf,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) && !defined(CONFIG_CHROMEOS)
                                0, dma_to_copy,
#endif
                                DMA_FROM_DEVICE);
                break;
        }
#endif
        default:
                ret = -EINVAL;
        }
You see, dma_buf_kmap and dma_buf_kunmap have been dropped in recent kernels.
However we do have dma_buf_vmap and dma_buf_vunmap which does the same, only it doesn't support pages, so it's like one big buffer.

Is there someone who can rewrite the above code to use dma_buf_v(un)map instead?
Or perhaps someone who already did this?
Last edited by MastaG on Thu Dec 24, 2020 10:21 pm, edited 1 time in total.

User avatar
tobetter
Posts: 7118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1041 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by tobetter »

@MastaG, let me add the change what I am using for ARM Mali Wayland driver and this change works with 5.10 kernel. So please try the patch and let me know if it works for you.
mali_r24p0.diff.txt
(1.91 KiB) Downloaded 16 times
What I am curious is if you are building the 5.10 kernel branch for XU4 your own? Or you are able to join my Linux branch which I already merged many kernel patches for XU4 from 5.4 but not being tested much. Such patches are being merged into new branch whenever new kernel version is uploaded but not tested much since I am currently focusing to support ODROID-N2/C4/HC4...so it would be great if you can suport my branch and do pull request if you add a patch. Then my build server can build the branch regularly and can be published through my package server.
https://github.com/tobetter/linux/commi ... oid-5.10.y

Please let me know your idea. :)
These users thanked the author tobetter for the post (total 2):
MastaG (Tue Dec 22, 2020 11:06 pm) • AdrianB (Tue Jan 12, 2021 5:54 am)

MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by MastaG »

Wow tobetter!
Thanks for the quick response!

I'll fork your branch, apply the patches and make some PR's once I get it working.
5.4 was working great btw, but it has become a bit old for recent distro's such as Fedora 33.
Also I like to test some of the upstream changes to the exynos drm driver for Kodi, samsung is still supporting it :)

I'll keep you posted.

User avatar
tobetter
Posts: 7118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1041 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by tobetter »

MastaG wrote:
Tue Dec 22, 2020 11:05 pm
Wow tobetter!
Thanks for the quick response!

I'll fork your branch, apply the patches and make some PR's once I get it working.
5.4 was working great btw, but it has become a bit old for recent distro's such as Fedora 33.
Also I like to test some of the upstream changes to the exynos drm driver for Kodi, samsung is still supporting it :)

I'll keep you posted.
Thanks a lot...if you can support my breanch, I would be able to release the packages for XU4 to run Debian/Ubuntu like what I am publishing for ODROID-N2/C4/HC4.
By the way, what's the version of your Mali driver?

Looking forward your PR. :D

MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by MastaG »

tobetter wrote:
Tue Dec 22, 2020 11:15 pm
Thanks a lot...if you can support my breanch, I would be able to release the packages for XU4 to run Debian/Ubuntu like what I am publishing for ODROID-N2/C4/HC4.
By the way, what's the version of your Mali driver?

Looking forward your PR. :D
I've opened a PR which gets the kernel running on my XU3 board (should work for XU4 as well).
See: https://github.com/tobetter/linux/pull/20

I'm using the r12p wayland/gbm mali driver from ARM.
Image

It works but there's a problem with the MFC decoding H264 in Kodi using the ffmpeg v4l2m2m decoder.
It seems to display the video in slowmotion?
The kernel will spit out:

Code: Select all

[  265.676299] vidioc_try_fmt:379: Unsupported format for destination.
This doesn't occur on HK's odroid-5.4.y branch.

I'll look into it further tomorrow.
And also collect some more commits which I'll send in another PR soon.

User avatar
tobetter
Posts: 7118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1041 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by tobetter »

@MastaG, thank you for your PR and I will look through them carefully.

One suggesion I have is that, I would like to not include Mali driver into the kernel source tree but want to have DKMS package. I made one repository for Mali DKMS earlier, not updated for long...so I will see if your patches in PR can be applied and can be built. I do remember it was r12p0 which is the same version what you are testing.

Once I finish to fix the build issue for XU4, I will share the OS image which includes your patches which saves my time a lot...
So...now it's time to resume the upstream kernel for XU4 again.

MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: More recent kernels lacking dma_buf_k(un)map for Mali

Post by MastaG »

Thank you tobetter,

The mali driver seems to work fine.
I've tested GLES on both gbm and wayland :)

But I can't figure out why the MFC is not decoding like it should.
When I boot with HK's odroid-5.4.y kernel I can launch Kodi and play my videos.
On 5.10.y it seems to decode very slowly.
And it will put:

Code: Select all

[  265.676299] vidioc_try_fmt:379: Unsupported format for destination.
It could be this commit: https://github.com/tobetter/linux/pull/ ... 2176e87b00

But it's exactly the same as upstream where they've also removed these two flags.
If I leave them, the build will error out with: DMA_ATTR_NON_CONSISTENT being undeclared..

EDIT: I see now that it was added by memeka in the first place: https://github.com/torvalds/linux/commi ... dfec0b9a76
It was cherry-picked for 5.10.y as well, but of course untested.

Any ideas?
Perhaps memeka could have a look as he did most of the MFC related commits for 5.4.

MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: Linux kernel 5.10 on XU3/4

Post by MastaG »

I've force-pushed to the PR because there were a few typos and a missing commit.
See: https://github.com/tobetter/linux/pull/20
Everything is working really good and stable.

Still I'm having a hard time finding out why my movies aren't playing at full speed like when using the HK odroid-5.4.y branch.


This is the full diff from 5.10's mfc driver to 5.4:

Code: Select all

--- odroid-5.10.y/drivers/media/platform/s5p-mfc/s5p_mfc_iommu.h	2020-12-22 18:17:45.721572998 +0100
+++ odroid-5.4.y/drivers/media/platform/s5p-mfc/s5p_mfc_iommu.h	2020-08-25 21:20:41.067009343 +0200
@@ -9,11 +9,9 @@
 
 #if defined(CONFIG_EXYNOS_IOMMU)
 
-#include <linux/iommu.h>
-
 static inline bool exynos_is_iommu_available(struct device *dev)
 {
-	return dev_iommu_priv_get(dev) != NULL;
+	return dev->archdata.iommu != NULL;
 }
 
 #else
--- odroid-5.10.y/drivers/media/platform/s5p-mfc/s5p_mfc.c	2021-01-04 14:28:36.908654895 +0100
+++ odroid-5.4.y/drivers/media/platform/s5p-mfc/s5p_mfc.c	2020-12-14 14:59:17.093317084 +0100
@@ -858,7 +858,7 @@
 	 * We'll do mostly sequential access, so sacrifice TLB efficiency for
 	 * faster allocation.
 	 */
-	q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NO_KERNEL_MAPPING;
+	q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
 	q->mem_ops = &vb2_dma_contig_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
 	ret = vb2_queue_init(q);
@@ -893,7 +893,7 @@
 	 * We'll do mostly sequential access, so sacrifice TLB efficiency for
 	 * faster allocation.
 	 */
-	q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NO_KERNEL_MAPPING;
+	q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
 	q->mem_ops = &vb2_dma_contig_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
 	ret = vb2_queue_init(q);
@@ -1094,10 +1094,6 @@
 	child->coherent_dma_mask = dev->coherent_dma_mask;
 	child->dma_mask = dev->dma_mask;
 	child->release = s5p_mfc_memdev_release;
-	child->dma_parms = devm_kzalloc(dev, sizeof(*child->dma_parms),
-					GFP_KERNEL);
-	if (!child->dma_parms)
-		goto err;
 
 	/*
 	 * The memdevs are not proper OF platform devices, so in order for them
@@ -1113,7 +1109,7 @@
 			return child;
 		device_del(child);
 	}
-err:
+
 	put_device(child);
 	return NULL;
 }
@@ -1385,7 +1381,7 @@
 	s5p_mfc_init_regs(dev);
 
 	/* Register decoder and encoder */
-	ret = video_register_device(dev->vfd_dec, VFL_TYPE_VIDEO, 0);
+	ret = video_register_device(dev->vfd_dec, VFL_TYPE_GRABBER, 10);
 	if (ret) {
 		v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
 		goto err_dec_reg;
@@ -1393,7 +1389,7 @@
 	v4l2_info(&dev->v4l2_dev,
 		  "decoder registered as /dev/video%d\n", dev->vfd_dec->num);
 
-	ret = video_register_device(dev->vfd_enc, VFL_TYPE_VIDEO, 0);
+	ret = video_register_device(dev->vfd_enc, VFL_TYPE_GRABBER, 10);
 	if (ret) {
 		v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
 		goto err_enc_reg;
--- odroid-5.10.y/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c	2021-01-04 14:03:26.264961839 +0100
+++ odroid-5.4.y/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c	2020-08-25 21:20:41.067009343 +0200
@@ -262,12 +262,6 @@
 		.default_value = V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED,
 	},
 	{
-		.id = V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE,
-		.type = V4L2_CTRL_TYPE_MENU,
-		.maximum = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,
-		.default_value = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,
-	},
-	{
 		.id = V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT,
 		.type = V4L2_CTRL_TYPE_BOOLEAN,
 		.name = "Fixed Target Bit Enable",
@@ -1864,7 +1858,6 @@
 		p->seq_hdr_mode = ctrl->val;
 		break;
 	case V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE:
-	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:
 		p->frame_skip_mode = ctrl->val;
 		break;
 	case V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT:
The above diff is basically me removing DMA_ATTR_NON_CONSISTENT (as it's removed from the kernel as of 5.9)
The rest of the changes are the following commits, which makes sense to me:
media: s5p-mfc: Use standard frame skip mode control: https://github.com/MastaG/linux/commit/ ... 9e3ee90510
iommu/exynos: Use dev_iommu_priv_get/set(): https://github.com/MastaG/linux/commit/ ... 9e3ee90510
media: s5p-mfc: Properly handle dma_parms for the allocated devices: https://github.com/MastaG/linux/commit/ ... 9e3ee90510
media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO: https://github.com/MastaG/linux/commit/ ... 9e3ee90510

The error: [ 265.676299] vidioc_try_fmt:379: Unsupported format for destination.

Seems to happen here in: s5p_mfc_dec.c

Code: Select all

/* Try format */
static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{
        struct s5p_mfc_dev *dev = video_drvdata(file);
        struct s5p_mfc_fmt *fmt;

        mfc_debug(2, "Type is %d\n", f->type);
        if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
                fmt = find_format(f, MFC_FMT_DEC);
                if (!fmt) {
                        mfc_err("Unsupported format for source.\n");
                        return -EINVAL;
                }
                if (fmt->codec_mode == S5P_FIMV_CODEC_NONE) {
                        mfc_err("Unknown codec\n");
                        return -EINVAL;
                }
                if ((dev->variant->version_bit & fmt->versions) == 0) {
                        mfc_err("Unsupported format by this MFC version.\n");
                        return -EINVAL;
                }
        } else if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
                fmt = find_format(f, MFC_FMT_RAW);
                if (!fmt) {
                        mfc_err("Unsupported format for destination.\n");
                        return -EINVAL;
                }
                if ((dev->variant->version_bit & fmt->versions) == 0) {
                        mfc_err("Unsupported format by this MFC version.\n");
                        return -EINVAL;
                }
        }

        return 0;
}
This is how the videos play using Kodi: https://streamable.com/o0foun

Now for the record, if I just reboot into HK's odroid-5.4.y kernel it will play fine. (same kodi)

@memeka or @areascout ? :D

User avatar
tobetter
Posts: 7118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1041 times
Contact:

Re: Linux kernel 5.10 on XU3/4

Post by tobetter »

@MastaG, thank you for updating. I do not see serious issue with your branch, tested with XU4/HC* although I have not tested video play on my end. I would not merge your PR at the moment, so please keep updating your branch as you wish and I will let you know when I can merge. I am still figuring out the build server why not building for XU4 and wish to finish by end of this week.

Thanks.

EDIT: Ok, finally I think I figured out why Linux package for XU4 is broken...probably I would be able to build prebuilt OS image sometime this week and I can merge your branch. Let me update you again.

MastaG
Posts: 352
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: Linux kernel 5.10 on XU3/4

Post by MastaG »

@tobetter that's OK.

I've did some testing and I can confirm everything works so far.
- loading edid firmware blobs for setting video output without a connected monitor
- hdmi audio
- analog audio on the XU3 (headphone jack)
- Gnome on wayland using GLES
- RetroArch with flycast

So the mali driver definitely works.

Still for the MFC decoding I could need some help ;)

AreaScout
Posts: 1588
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 91 times
Been thanked: 264 times
Contact:

Re: Linux kernel 5.10 on XU3/4

Post by AreaScout »

    @MastaG

    What about Kodi Matrix on kernel 5.10, are those EGL errors (GEM buffer empty) still there ? I was trying to track down the problem on 5.4 kernel and Kodi Matrix but I have to say that this is not easy to find, I tried several things on GBM/DRM code but none of then worked, however one try was giving me more time to browse the menu it crashed Kodi much later, now I am busy with Go Super but it's GEM buffer obtained and not free, if it's working with 5.10 maybe it's 5.4 kernel side

    RG

    chewitt
    Posts: 64
    Joined: Mon Aug 12, 2019 12:27 pm
    languages_spoken: english
    Has thanked: 0
    Been thanked: 74 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by chewitt »

    Just an FYI, the panfrost driver still fails with Kodi on XU4. I can run kmcube and some other things fine, but Kodi causes a lock-up shortly after the GUI starts and I've not been able to get a backtrace or anything usable to feed to the panfrost devs; partly because I'm a coding n00b and have no real clue about that kind of thing. If anyone more competent can get a Kodi debug build running to acquire that info it would be good (no blobs would be great).

    I'm also interested in the 5.10+ patchset .. I've got 5.11-rc2 running on a board for poking but I'm not so familar with the Exynos platform.
    These users thanked the author chewitt for the post:
    AreaScout (Wed Jan 06, 2021 6:39 pm)

    MastaG
    Posts: 352
    Joined: Mon Aug 26, 2013 6:05 pm
    languages_spoken: english
    Has thanked: 27 times
    Been thanked: 22 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by MastaG »

    @AreaScout
    The kodi gbm freeze with the latest git happens on both 5.4 and 5.10 kernel.
    I think they simply adapted too much to recent kms/drm or mesa changes, causing something weird in the mali kernel or userspace drivers.
    When I have some more time, I'll try to bisect the problem (only Kodi is painfully slow to build on the XU4).
    Also keep in mind that I'm using the exact same (outdated) mali kernel and userspace drivers in 5.10 as it is in 5.4.

    The only difference is that in 5.10 the mfc also stopped to decode properly when running kodi in a wayland session (which still works as opposed to the gbm build).

    @chewitt
    I've already checked out your kernel tree (great job!) for 5.10 and also merged the mali kernel driver (like I did for tobetter's PR).
    But the mfc decoding problem remains :(

    Also I've tried Panfrost like 6 months ago by compiling a mesa snapshot.
    While I didn't try kodi, I got it to run Gnome desktop on wayland.
    But there were many flickering black artifacts on the screen.
    I've asked the Panfrost devs (Alyssa Rosenzweig), but they have no plans to support the the XU4 mali GPU because it's very old and contains many silicon bugs.
    Also I don't like the lack of documentation for Panfrost.
    For example, the Panfrost kernel driver doesn't initialize my HDMI output like the exynos drm.
    And the mesa Panfrost userspace drivers are not compatible with the exynos kernel driver either.. I was getting all sorts of errors related to the userspace driver trying to do stuff that the exynos driver does not handle.

    It would be nice if someone would just post patches for the kernel and for mesa to try out Panfrost without requiring the exynos drm driver.
    That's why I'm still relying on the old mali blobs which get harder to maintain when all applications start relying on more recent kernel and mesa changes... Let alone adapting the mali kernel driver everytime.

    And for the record, I'm also not a coder.. just some very basic C skills here..

    I think if we can fix the kodi gbm freeze and get the mfc to play nice on linux 5.10, we can do a final round of modern distro's with kodi 19 before we can lay our XU4's to rest ;)
    These users thanked the author MastaG for the post:
    AreaScout (Wed Jan 06, 2021 6:40 pm)

    chewitt
    Posts: 64
    Joined: Mon Aug 12, 2019 12:27 pm
    languages_spoken: english
    Has thanked: 0
    Been thanked: 74 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by chewitt »

    I'm still working on the panfrost devs. T628 is the same silicon generation as T720 which is supported, but there are still some bits of the panfrost driver missing and "errata" (bugs in arm-speak) to code around. Since the latest batch of code dropped bringing GLES 3.0 support kmscube went from "works, but crashy" to "works perfectly" so I'm hopefull some other missing bits might close the gap once included. I'm also owed a few favours after persuading the devs to work on bifrost and making the intro to ARM that ultimately led to support :) .. IMHO the biggest issue for T628 is not documentation (which they have now) or lack of commercial interest (there is none) but more they are easily distracted with other things that are just more fun than coding workarounds for errata.

    To support the MFC in K19+ "properly" this will be required https://patchwork.kernel.org/project/li ... msung.com/ but there are some conflicting changes (bitrot) so it needs reworking to be mergeable/usable, and then I've been told it needs adaptation to support 5422.
    These users thanked the author chewitt for the post (total 2):
    AreaScout (Wed Jan 06, 2021 6:39 pm) • MastaG (Wed Jan 06, 2021 11:20 pm)

    MastaG
    Posts: 352
    Joined: Mon Aug 26, 2013 6:05 pm
    languages_spoken: english
    Has thanked: 27 times
    Been thanked: 22 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by MastaG »

    chewitt wrote:
    Wed Jan 06, 2021 2:25 pm
    I'm still working on the panfrost devs. T628 is the same silicon generation as T720 which is supported, but there are still some bits of the panfrost driver missing and "errata" (bugs in arm-speak) to code around. Since the latest batch of code dropped bringing GLES 3.0 support kmscube went from "works, but crashy" to "works perfectly" so I'm hopefull some other missing bits might close the gap once included. I'm also owed a few favours after persuading the devs to work on bifrost and making the intro to ARM that ultimately led to support :) .. IMHO the biggest issue for T628 is not documentation (which they have now) or lack of commercial interest (there is none) but more they are easily distracted with other things that are just more fun than coding workarounds for errata.

    To support the MFC in K19+ "properly" this will be required https://patchwork.kernel.org/project/li ... msung.com/ but there are some conflicting changes (bitrot) so it needs reworking to be mergeable/usable, and then I've been told it needs adaptation to support 5422.
    That's very good news regarding Panfrost support.
    If you have some time in the future, perhaps you could do a small post here with the details on which kernel and mesa patches are required to get Panfrost running on the XU4 :)

    Regarding Kodi, I've built todays git from master branch and ffmpeg as well.
    I've attached the patches I've applied to Kodi and ffmpeg. (only minimal changes)
    Still I only run it on Wayland because the gbm build is still freezing up on both linux 5.4 and 5.10:

    Code: Select all

    2021-01-06 14:41:09.388 T:28682   ERROR <general>: eglSwapBuffers failed (EGL_BAD_ALLOC)
    [10473.947124] exynos-mixer 14450000.mixer: [drm:exynos_drm_gem_create] *ERROR* failed to allocate buffer.
    [10473.955161] exynos-drm exynos-drm: FB allocation failed.
    [10473.967811] exynos-mixer 14450000.mixer: [drm:exynos_drm_gem_create] *ERROR* failed to allocate buffer.
    [10473.975844] exynos-drm exynos-drm: FB allocation failed.
    I remember it was working even after they rewrote the gbm code, it must be a recent change causing this.
    Will continue to look for the offending commit.

    Regarding the MFC decoding issue, it seems I was wrong about the message: "vidioc_try_fmt:379: Unsupported format for destination"
    This message happens on both 5.4 and 5.10 when playing h264 video's in Kodi on wayland.
    Still on 5.4 the videos play at full speed: https://streamable.com/w69bv4
    But on 5.10 they play in slow motion: https://streamable.com/u8weqv

    I'll look into the exynos patchset you posted, if the existing code didn't change too much, perhaps I can get it to apply and build :)
    Attachments
    kodi19.patch.zip
    (2.37 KiB) Downloaded 6 times
    ffmpeg.patch.zip
    (958 Bytes) Downloaded 6 times
    These users thanked the author MastaG for the post (total 3):
    tobetter (Wed Jan 06, 2021 11:50 pm) • odroid (Thu Jan 07, 2021 9:58 am) • AreaScout (Thu Jan 07, 2021 11:52 pm)

    AreaScout
    Posts: 1588
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 91 times
    Been thanked: 264 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by AreaScout »

    MastaG wrote:
    Wed Jan 06, 2021 11:48 pm
    I'll look into the exynos patchset you posted, if the existing code didn't change too much, perhaps I can get it to apply and build :)
    That would be cool because if I understand it right that patch would bring NV12 plane support which at the end would give us DRM Prime support, no patches for DVDVideoCodecFFmpeg.cpp would be need anymore, am I right ?

    RG

    MastaG
    Posts: 352
    Joined: Mon Aug 26, 2013 6:05 pm
    languages_spoken: english
    Has thanked: 27 times
    Been thanked: 22 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by MastaG »

    AreaScout wrote:
    Thu Jan 07, 2021 11:52 pm
    MastaG wrote:
    Wed Jan 06, 2021 11:48 pm
    I'll look into the exynos patchset you posted, if the existing code didn't change too much, perhaps I can get it to apply and build :)
    That would be cool because if I understand it right that patch would bring NV12 plane support which at the end would give us DRM Prime support, no patches for DVDVideoCodecFFmpeg.cpp would be need anymore, am I right ?

    RG
    I'm not familiar with the drm prime path.. would that automatically trigger decoding of the PES using the MFC as well? or is it only for rendering the decoded frames?
    Also keep in mind I'm not so much of a C programmer, but I'll try my best :D

    AreaScout
    Posts: 1588
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 91 times
    Been thanked: 264 times
    Contact:

    Re: Linux kernel 5.10 on XU3/4

    Post by AreaScout »

      What is PES ?
      MastaG wrote:
      Fri Jan 08, 2021 12:19 am
      or is it only for rendering the decoded frames?
      Yes it is rendering the decoded frame, from MFC we get a NV12 frame and because we can't pass it directly to a drm plane (no NV12 color support, only ARGB and XRGB) we color convert it with shaders to ARGB and then pass it to VOP (EGL Swap), but ! if we have a DRM plane with NV12 support due to a HW color conversation with GSCALER we would be able to take the NV12 frame from the decoder and move it directly to the VOP (video output processor) using kodi's DRMPrime backend

      RG

      chewitt
      Posts: 64
      Joined: Mon Aug 12, 2019 12:27 pm
      languages_spoken: english
      Has thanked: 0
      Been thanked: 74 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by chewitt »

      This is my 5.11.y branch https://github.com/chewitt/linux/commits/samsung-5.11.y it contains the same not-quite-upstream panfrost patches as my Amlogic branch. I can get kmscube to work, but Kodi faults on startup.

      For K19 to work you might need these enabling in defconfig:

      CONFIG_DMABUF_HEAPS=y
      CONFIG_DMABUF_HEAPS_SYSTEM=y
      CONFIG_DMABUF_HEAPS_CMA=y

      @AreaScout, you understand that patch series correctly, but I was told there is more needed to get it working with 5422 (which is largely undocumented). It's the correct direction to push things though.
      These users thanked the author chewitt for the post:
      AreaScout (Sat Jan 09, 2021 1:02 am)

      User avatar
      tobetter
      Posts: 7118
      Joined: Mon Feb 25, 2013 10:55 am
      languages_spoken: Korean, English
      ODROIDs: Many
      Location: Paju, South Korea
      Has thanked: 380 times
      Been thanked: 1041 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by tobetter »

      I finally made a server image of Ubuntu 20.04 with Linux kernel 5.10 that can boot from ODROID-XU4/HC1/HC2. Download think a quick installation guide is also uploaded.
      https://docs.linuxfactory.or.kr/install ... image.html

      Code: Select all

      Ubuntu 20.04.1 LTS focal-server ttySAC2
      
      focal-server login: odroid
      Password: 
      Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.10.0-odroid-armmp armv7l)
      
       * Documentation:  https://help.ubuntu.com
       * Management:     https://landscape.canonical.com
       * Support:        https://ubuntu.com/advantage
       _   _               _ _                        _ 
      | | | | __ _ _ __ __| | | _____ _ __ _ __   ___| |
      | |_| |/ _` | '__/ _` | |/ / _ \ '__| '_ \ / _ \ |
      |  _  | (_| | | | (_| |   <  __/ |  | | | |  __/ |
      |_| |_|\__,_|_|  \__,_|_|\_\___|_|  |_| |_|\___|_|
                                                        
        ___      _           _     _  __  ___   _ _  _   
       / _ \  __| |_ __ ___ (_) __| | \ \/ / | | | || |  
      | | | |/ _` | '__/ _ \| |/ _` |  \  /| | | | || |_ 
      | |_| | (_| | | | (_) | | (_| |  /  \| |_| |__   _|
       \___/ \__,_|_|  \___/|_|\__,_| /_/\_\\___/   |_|  
                                                         
      
      Welcome to Ubuntu 20.04.1 LTS
      Monday, 11 January 2021, 12:48:45 PM
      Up time:     0 days, 00:23:07
      Free memory: 1737584 / 2039528 kB
      IP:          192.168.0.131
      
      [!] Please visit 'https://launchpad.net/odroid-image' to report a bug
      Last login: Wed Apr  1 17:23:57 UTC 2020 on ttySAC2
      
      odroid@focal-server:~$ uname -a
      Linux focal-server 5.10.0-odroid-armmp #1 SMP PREEMPT Ubuntu 5.10.5-202101081935~focal (2021-01-08) armv7l armv7l armv7l GNU/Linux
      
      Since the new image need to use newer U-boot (still old but newer than stock Hardkernel U-boot), you need to replace the boot loader in eMMC memory card before flashing the new OS image. SD card does not have any issue to flash the image and boot from it.

      @MastaG, I've merged your two commits to kernel branch but not merged the Mali driver patches since I am going to manage a dkms package for Mali driver and your change will be merged and provided as a package later probably in this week. :)

      AdrianB
      Posts: 15
      Joined: Thu Aug 31, 2017 5:03 am
      languages_spoken: english
      ODROIDs: C2
      Has thanked: 2 times
      Been thanked: 0
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by AdrianB »

      Hello all!

      Thanks to @odroid for pointing me to this thread.
      These days I was able to port the Mali Midgard OpenSource r28p0 to Linux 5.6 and later. I've was able to compile it on 5.4, 5.9 and 5.10 on my Odroid XU4. I've created also a list of what issues I've found. Also I've notice that somebody faced the same issue with dma_buf_kmap and dma_buf_kunmap functions that were removed starting with Kernel 5.6. I've adapt my code to try to use dma_buf_vmap, but I'm not a expert programmer and I don't know if is working properly. Otherwise I will try to use the idea from @tobetter - mali_r24p0.diff.txt

      Know my issue is this: the module is compiling well under all kernels but when I'm loading it is not detecting any Mali GPU :(. Before loading mali_kbase module I removed the panfrost module, which surprisingly is detecting my GPU correctly.

      Here is my experimental mali-midgard r28p0 driver:
      https://github.com/EasyNetDev/mali-midgard

      Now I'm trying "tobetter" kernel 5.10.6 using PR #20 but it gave me plenty of missing symbols:

      Code: Select all

      ERROR: modpost: "kbase_reg_write" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_set_custom_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_active" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_idle" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_reg_read" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_gpu_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "mm_trace_rss_stat" [drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
      
      At least the last one "mm_trace_rss_stat" is related to

      Code: Select all

      add_mm_counter(mm, MM_FILEPAGES, pages);
      function which it can be replaced, with backwards compatibility, with this:

      Code: Select all

      #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
                      add_mm_counter(mm, MM_FILEPAGES, pages);
      #else
                      atomic_long_add(pages, &mm->rss_stat.count[MM_FILEPAGES]);
      #endif
      
      The rest of the symbols I didn't take a look yet, but seems that are from the driver itself.

      Is suppose to be something else that I need for the driver to be able to find my GPU? I'm struggling to make this GPU to work for a while and it's annoying me :).

      User avatar
      tobetter
      Posts: 7118
      Joined: Mon Feb 25, 2013 10:55 am
      languages_spoken: Korean, English
      ODROIDs: Many
      Location: Paju, South Korea
      Has thanked: 380 times
      Been thanked: 1041 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by tobetter »

      @AdrianB, if my understanding is correct, you are porting Mali r28p0 driver and which is not tested with ODROID-XU4 yet?

      User avatar
      odroid
      Site Admin
      Posts: 36385
      Joined: Fri Feb 22, 2013 11:14 pm
      languages_spoken: English, Korean
      ODROIDs: ODROID
      Has thanked: 1431 times
      Been thanked: 980 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by odroid »

      @AdrianB,
      Where did you obtain a Mali-T628 compatible r28p0 user land driver .so file?

      MastaG
      Posts: 352
      Joined: Mon Aug 26, 2013 6:05 pm
      languages_spoken: english
      Has thanked: 27 times
      Been thanked: 22 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by MastaG »

      chewitt wrote:
      Fri Jan 08, 2021 8:08 pm
      This is my 5.11.y branch https://github.com/chewitt/linux/commits/samsung-5.11.y it contains the same not-quite-upstream panfrost patches as my Amlogic branch. I can get kmscube to work, but Kodi faults on startup.

      For K19 to work you might need these enabling in defconfig:

      CONFIG_DMABUF_HEAPS=y
      CONFIG_DMABUF_HEAPS_SYSTEM=y
      CONFIG_DMABUF_HEAPS_CMA=y

      @AreaScout, you understand that patch series correctly, but I was told there is more needed to get it working with 5422 (which is largely undocumented). It's the correct direction to push things though.
      I have these enabled in my config already.
      It's just that playback of H264 videos seems slowed down on 5.10 vs 5.4.
      But then again I was only able to test it on Kodi on Wayland (as Kodi on GBM still crashes).
      AdrianB wrote:
      Tue Jan 12, 2021 4:43 am
      Hello all!

      Thanks to @odroid for pointing me to this thread.
      These days I was able to port the Mali Midgard OpenSource r28p0 to Linux 5.6 and later. I've was able to compile it on 5.4, 5.9 and 5.10 on my Odroid XU4. I've created also a list of what issues I've found. Also I've notice that somebody faced the same issue with dma_buf_kmap and dma_buf_kunmap functions that were removed starting with Kernel 5.6. I've adapt my code to try to use dma_buf_vmap, but I'm not a expert programmer and I don't know if is working properly. Otherwise I will try to use the idea from @tobetter - mali_r24p0.diff.txt

      Know my issue is this: the module is compiling well under all kernels but when I'm loading it is not detecting any Mali GPU :(. Before loading mali_kbase module I removed the panfrost module, which surprisingly is detecting my GPU correctly.

      Here is my experimental mali-midgard r28p0 driver:
      https://github.com/EasyNetDev/mali-midgard

      Now I'm trying "tobetter" kernel 5.10.6 using PR #20 but it gave me plenty of missing symbols:

      Code: Select all

      ERROR: modpost: "kbase_reg_write" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_set_custom_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_active" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_idle" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_reg_read" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_gpu_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "mm_trace_rss_stat" [drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
      
      At least the last one "mm_trace_rss_stat" is related to

      Code: Select all

      add_mm_counter(mm, MM_FILEPAGES, pages);
      function which it can be replaced, with backwards compatibility, with this:

      Code: Select all

      #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
                      add_mm_counter(mm, MM_FILEPAGES, pages);
      #else
                      atomic_long_add(pages, &mm->rss_stat.count[MM_FILEPAGES]);
      #endif
      
      The rest of the symbols I didn't take a look yet, but seems that are from the driver itself.

      Is suppose to be something else that I need for the driver to be able to find my GPU? I'm struggling to make this GPU to work for a while and it's annoying me :).
      Thanks for also looking into the mali driver on 5.10 ! :)
      I'm not getting these missing symbols, did you make sure that both commits have been applied? (as tobetter didn't commit them)
      https://github.com/tobetter/linux/pull/ ... 171c1b9093
      https://github.com/tobetter/linux/pull/ ... 34177c23a6
      Or perhaps there's something missing in your config.

      I've attached the two commits and my config below.
      Attachments
      mali.zip
      (472.57 KiB) Downloaded 5 times
      config-5.10.zip
      (43.83 KiB) Downloaded 6 times

      AreaScout
      Posts: 1588
      Joined: Sun Jul 07, 2013 3:05 am
      languages_spoken: german, english
      ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
      N1, Go, VU5A, Show2, CloudShell2,
      H2, N2, VU7A, VuShell, Go2, C4
      Has thanked: 91 times
      Been thanked: 264 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by AreaScout »

      @chewitt @MastaG

      I have enabled DMA and UDMA buf but still Kodi crashes, anything else I have to apply ?

      Code: Select all

      #
      # DMABUF options
      #
      CONFIG_SYNC_FILE=y
      # CONFIG_SW_SYNC is not set
      CONFIG_UDMABUF=y
      CONFIG_DMABUF_HEAPS=y
      CONFIG_DMABUF_HEAPS_SYSTEM=y
      CONFIG_DMABUF_HEAPS_CMA=y
      # CONFIG_DMABUF_SELFTESTS is not set
      # end of DMABUF options
      
      RG

      AdrianB
      Posts: 15
      Joined: Thu Aug 31, 2017 5:03 am
      languages_spoken: english
      ODROIDs: C2
      Has thanked: 2 times
      Been thanked: 0
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by AdrianB »

      Hi guys,

      Because I'm pretty new in Mali drivers and user space binaries, I'm trying to understand how these 2 are working (Kernel Driver & User Space Binaries). After a research I've found this link: http://linux-exynos.org/wiki/Mali_drivers where is mention that actually I need to match the kernel driver with user space version. These are very new facts for me.
      From here I can understand the driver r28p0 is completely useless on Android.
      The latest version of user binaries for Odroid XU3 are malit62xr12p004rel0. There is another version: malit62xr10p000rel0.

      Now I'm trying to make it work @tobetter kernel with user space binaries, but I'm notice this:

      Code: Select all

      [    2.853594] mali 11800000.gpu: GPU identified as 0x0620 r0p1 status 0
      [    2.853927] mali 11800000.gpu: Protected mode not available
      [    2.854627] mali 11800000.gpu: Probed as mali0
      
      I don't understand if r0p1 is Odroid XU3/XU4 hardware version (as I've found on Mali Driver site) or is the driver version.
      What binaries I must use with this driver?
      Sorry for these confusions, but this ARM device gave me headaches to make the hardware acceleration.

      Adrian

      AdrianB
      Posts: 15
      Joined: Thu Aug 31, 2017 5:03 am
      languages_spoken: english
      ODROIDs: C2
      Has thanked: 2 times
      Been thanked: 0
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by AdrianB »

      Hi MastaG,

      These symbols missing complains are only when you build the driver as module. Is a headache to build it as module. If I'm integrating it into the kernel I was able to build it.
      Now I've notice plenty of warnings. After your PR it will be pushed to the main source, I will add some additional cosmetic patches to avoid all these warnings. I did it for r28p0, which seems to be totally useless for Odroid XU4.

      What user-space binaries I have to use with X11 to make this GPU working?
      MastaG wrote:
      Tue Jan 12, 2021 6:44 pm
      chewitt wrote:
      Fri Jan 08, 2021 8:08 pm
      This is my 5.11.y branch https://github.com/chewitt/linux/commits/samsung-5.11.y it contains the same not-quite-upstream panfrost patches as my Amlogic branch. I can get kmscube to work, but Kodi faults on startup.

      For K19 to work you might need these enabling in defconfig:

      CONFIG_DMABUF_HEAPS=y
      CONFIG_DMABUF_HEAPS_SYSTEM=y
      CONFIG_DMABUF_HEAPS_CMA=y

      @AreaScout, you understand that patch series correctly, but I was told there is more needed to get it working with 5422 (which is largely undocumented). It's the correct direction to push things though.
      I have these enabled in my config already.
      It's just that playback of H264 videos seems slowed down on 5.10 vs 5.4.
      But then again I was only able to test it on Kodi on Wayland (as Kodi on GBM still crashes).
      AdrianB wrote:
      Tue Jan 12, 2021 4:43 am
      Hello all!

      Thanks to @odroid for pointing me to this thread.
      These days I was able to port the Mali Midgard OpenSource r28p0 to Linux 5.6 and later. I've was able to compile it on 5.4, 5.9 and 5.10 on my Odroid XU4. I've created also a list of what issues I've found. Also I've notice that somebody faced the same issue with dma_buf_kmap and dma_buf_kunmap functions that were removed starting with Kernel 5.6. I've adapt my code to try to use dma_buf_vmap, but I'm not a expert programmer and I don't know if is working properly. Otherwise I will try to use the idea from @tobetter - mali_r24p0.diff.txt

      Know my issue is this: the module is compiling well under all kernels but when I'm loading it is not detecting any Mali GPU :(. Before loading mali_kbase module I removed the panfrost module, which surprisingly is detecting my GPU correctly.

      Here is my experimental mali-midgard r28p0 driver:
      https://github.com/EasyNetDev/mali-midgard

      Now I'm trying "tobetter" kernel 5.10.6 using PR #20 but it gave me plenty of missing symbols:

      Code: Select all

      ERROR: modpost: "kbase_reg_write" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_set_custom_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_active" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_pm_context_idle" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_reg_read" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "kbase_gpu_irq_handler" [drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/mali_kutf_irq_test.ko] undefined!
      ERROR: modpost: "mm_trace_rss_stat" [drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
      
      At least the last one "mm_trace_rss_stat" is related to

      Code: Select all

      add_mm_counter(mm, MM_FILEPAGES, pages);
      function which it can be replaced, with backwards compatibility, with this:

      Code: Select all

      #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
                      add_mm_counter(mm, MM_FILEPAGES, pages);
      #else
                      atomic_long_add(pages, &mm->rss_stat.count[MM_FILEPAGES]);
      #endif
      
      The rest of the symbols I didn't take a look yet, but seems that are from the driver itself.

      Is suppose to be something else that I need for the driver to be able to find my GPU? I'm struggling to make this GPU to work for a while and it's annoying me :).
      Thanks for also looking into the mali driver on 5.10 ! :)
      I'm not getting these missing symbols, did you make sure that both commits have been applied? (as tobetter didn't commit them)
      https://github.com/tobetter/linux/pull/ ... 171c1b9093
      https://github.com/tobetter/linux/pull/ ... 34177c23a6
      Or perhaps there's something missing in your config.

      I've attached the two commits and my config below.

      MastaG
      Posts: 352
      Joined: Mon Aug 26, 2013 6:05 pm
      languages_spoken: english
      Has thanked: 27 times
      Been thanked: 22 times
      Contact:

      Re: Linux kernel 5.10 on XU3/4

      Post by MastaG »

      AreaScout wrote:
      Tue Jan 12, 2021 10:27 pm
      @chewitt @MastaG

      I have enabled DMA and UDMA buf but still Kodi crashes, anything else I have to apply ?

      Code: Select all

      #
      # DMABUF options
      #
      CONFIG_SYNC_FILE=y
      # CONFIG_SW_SYNC is not set
      CONFIG_UDMABUF=y
      CONFIG_DMABUF_HEAPS=y
      CONFIG_DMABUF_HEAPS_SYSTEM=y
      CONFIG_DMABUF_HEAPS_CMA=y
      # CONFIG_DMABUF_SELFTESTS is not set
      # end of DMABUF options
      
      RG
      Hi for the record, I wasn't able to solve the crash when building Kodi (from master git) for GBM platform.
      The freeze/segfault is unrelated to the kernel version and happens on both 5.4 and 5.10.

      The issue I was facing was regarding slow playback when running Kodi on the Wayland platform (on Gnome Desktop session), which only happens in kernel 5.10 while on 5.4 it plays perfectly fine.

      Post Reply

      Return to “Linux Kernel 5.4 Development Party”

      Who is online

      Users browsing this forum: No registered users and 1 guest