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

[PATCH] Check for resources when validating KMSDRM device in check_modesetting #3083

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.9
Reported for operating system, platform: Linux, ARM

Comments on the original bug report:

On 2018-11-30 12:04:26 +0000, Sergey Zhuravlevich wrote:

Created attachment 3515
PATCH: Check for resources when validating KMSDRM device in check_modesetting.

On our imx51 based platform card1 is the right card to use for rendering and card0 has zero connectors, encoders and CRTCs. This patch adds a check for resources to device selection routine so the right card could be picked on any platform.

On 2018-12-01 17:59:16 +0000, Ryan C. Gordon wrote:

Just to verify: the call to KMSDRM_drmModeFreeResources() needs to happen if resources != NULL, but right now it's happening only in here:

if (resources->count_connectors > 0 && resources->count_encoders > 0 && resources->count_crtcs > 0) {
available = SDL_TRUE;
KMSDRM_drmModeFreeResources(resources);
}

...should I move that outside of the if statement?

--ryan.

On 2018-12-01 18:27:41 +0000, Sergey Zhuravlevich wrote:

(In reply to Ryan C. Gordon from comment # 1)

Just to verify: the call to KMSDRM_drmModeFreeResources() needs to happen if
resources != NULL, but right now it's happening only in here:

if (resources->count_connectors > 0 && resources->count_encoders > 0 &&
resources->count_crtcs > 0) {
available = SDL_TRUE;
KMSDRM_drmModeFreeResources(resources);
}

...should I move that outside of the if statement?

--ryan.

Yes, sure, that was my mistake. Thanks for noticing!

On 2018-12-01 21:32:54 +0000, Ryan C. Gordon wrote:

Ok, this patch (with that free call moved) is now https://hg.libsdl.org/SDL/rev/2e2cff8a14b6, thanks!

--ryan.

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

No branches or pull requests

1 participant