Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix up desktop display init regression #428

Closed
wants to merge 1 commit into from

Conversation

chadmed
Copy link
Member

@chadmed chadmed commented Dec 18, 2024

Commit 869d2ae inadvertently dropped the call to get_device_info() and also prevented DCP from initialising on Mac desktops. This series fixes both of those things.

I'm not entirely happy with the way we're checking for a DCP, it's a bit ugly.

@chadmed chadmed force-pushed the fix-dev-info branch 2 times, most recently from 8a01413 to 361580f Compare December 18, 2024 06:57
@chadmed chadmed changed the title Fix up sussy commit Fix up sussy commit/desktop display init Dec 18, 2024
@chadmed chadmed changed the title Fix up sussy commit/desktop display init Fix up desktop display init regression Dec 18, 2024
@@ -51,7 +51,7 @@ void get_device_info(void)
printf(" Target: %s\n", target);

is_mac = !!strstr(model, "Mac");
has_dcp = adt_path_offset(adt, "/arm-io/dcp") > 0;
has_dcp = !!adt_path_offset(adt, "/arm-io/dcp") || !!adt_path_offset(adt, "/arm-io/dcpext0");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to the fix. this should use the display_config from display.c. I also don't see the need to handle this outside display.c. The called functions should just return immediately when running on device without dcp. I can fix that tonight

@asdfugil
Copy link
Contributor

asdfugil commented Dec 18, 2024

get_device_info() call was moved to src/startup.c, it's not "dropped".

Desktops do not have /arm-io/dcp. They have /arm-io/dcpext0. Only checking
for the former means we were essentially unconditionally skipping display
init on desktops. Check for both so that DCP is always initialised when
required.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants