| Summary: | [PATCH] Check for resources when validating KMSDRM device in check_modesetting | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sergey Zhuravlevich <zhurxx> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.9 | ||
| Hardware: | ARM | ||
| OS: | Linux | ||
| Attachments: | PATCH: Check for resources when validating KMSDRM device in check_modesetting. | ||
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.
(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! Ok, this patch (with that free call moved) is now https://hg.libsdl.org/SDL/rev/2e2cff8a14b6, thanks! --ryan. |
Created attachment 3515 [details] 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.