Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

reimplement legacy modesetting #99

Merged
merged 5 commits into from
Oct 13, 2020
Merged

Conversation

ardera
Copy link
Owner

@ardera ardera commented Oct 11, 2020

This is pretty ugly right now, and I'm not sure the performance is as good as with atomic modesetting

@ardera ardera changed the base branch from master to develop October 11, 2020 20:38
@bing-mao
Copy link

Thank you ardera, I have checkout this branch and test on my board.

It says:

root@nanopi3:~/flutter-pi# ./out/flutter-pi ../flutter_assets/
[modesetting] Could not set DRM client atomic capable. drmSetClientCap: Operation not supported
[flutter-pi] Could not create drmdev from device at "/dev/dri/card1". Continuing.
[modesetting] Could not set DRM client universal planes capable. drmSetClientCap: Operation not supported
[flutter-pi] Could not create drmdev from device at "/dev/dri/card0". Continuing.
flutter-pi couldn't find a usable DRM device.
Please make sure you've enabled the Fake-KMS driver in raspi-config.
If you're not using a Raspberry Pi, please make sure there's KMS support for your graphics chip.

fix drmdev_new_from_fd failing for legacy modeset devices
@ardera
Copy link
Owner Author

ardera commented Oct 11, 2020

Should work now and performance should be acceptable

@bing-mao
Copy link

Thank you ardera!

I tested your latest code, Looks the app read incorrect screen info.

===================================
display mode:
resolution: 1021 x 61440
refresh rate: 4026532341Hz
physical size: 108mm x 64mm
flutter device pixel ratio: 2.487817

then it gets error when allocating memory

DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory

I will post the log file into the CR

Thanks,
Bing

@ardera
Copy link
Owner Author

ardera commented Oct 12, 2020

Okay, I understand where the incorrect refresh rate may come from. But I have no idea why the resolution is wrong. I added some logging, can you try it out and send me the output?

The DRM_IOCTL_MODE_CREATE_DUMB failing is not a problem though, it's related to the hardware mouse cursor and it's probably failing because the resolution of 1021x61440 causes huge frame buffers to be allocated.

Thanks for the modetest log btw, that was really helpful

@bing-mao
Copy link

Hi ardera,
Here is the log file. Looks the resolution is still very large.

nanopi3_flutter-pi_log2.txt

dont create display mode property blob if not using atomic modesetting
@ardera
Copy link
Owner Author

ardera commented Oct 12, 2020

Okay, can you try again with this commit? I fixed one thing that could've been the cause

@bing-mao
Copy link

HI ardera,
Thank you for quick response! Now the build is good, no crash and the touch is working well. Here is the starting log
nanopi3_flutter-pi_log3.txt

Though my device has some issue when displaying complicated UI, looks like something didn't redraw, but this existed on the older build as well. Overall, your latest code is better in every aspect compared with the old commit I used.

BR,
Bing

@ardera
Copy link
Owner Author

ardera commented Oct 13, 2020

That's probably a driver issue. There are a lot of driver issues with these niche GPUs. Driver issues is actually where this project started, the original chinmaygarde/flutter_from_scratch project used the legacy OpenGL driver on the Raspberry Pi, which was completely unusable. (A lot of textures disappearing and reappearing) So I switched it over to using DRM/KMS and Mesa

@ardera ardera merged commit af6cad1 into develop Oct 13, 2020
@ardera ardera deleted the feature/legacy-modesetting branch October 13, 2020 12:30
@bing-mao
Copy link

Thank you ardera. Appreciate you generous help. I will check my driver.

@ardera
Copy link
Owner Author

ardera commented Oct 13, 2020

Thanks, I'm glad I could help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants