-
Notifications
You must be signed in to change notification settings - Fork 336
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
[DNM] [experimental-tmp] Add LG Nexus 5X support #220
base: experimental-tmp
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#include <skeleton64.dtsi> | ||
#include <lk2nd.dtsi> | ||
|
||
/ { | ||
model = "LG Nexus 5X"; | ||
qcom,msm-id = <251 0>, <252 0>; | ||
qcom,pmic-id = <0x10009 0x1000A 0x0 0x0>; | ||
qcom,board-id = <0xb64 0>; | ||
}; | ||
|
||
&lk2nd { | ||
model = "LG Nexus 5X"; | ||
compatible = "lg,bullhead"; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
LOCAL_DIR := $(GET_LOCAL_DIR) | ||
|
||
ADTBS += \ | ||
$(LOCAL_DIR)/msm8992-lg-bullhead.dtb \ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,9 @@ static void mdp_cmd_signal_refresh(void) | |
|
||
static void mdp_cmd_refresh_start(struct fbcon_config *fb) | ||
{ | ||
#if ENABLE_AUTOREFRESH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason hw autorefresh wasn't used is because it didn't work on some platforms (i.e. on 8974) so it was decided to use a more "reliable" (even if ugly) solution. See #137 that adds this thread as well as a manual autorefresh kick via fastboot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to avoid making such changes unconditionally. lk2nd is meant to boot a variety of different boot images (downstream, mainline, lk2nd itself, other operating systems) and enabling autorefresh may break booting them (downstream would be the most likely candidate for that). However, we could potentially enable autorefresh immediately before booting a Linux that needs this. It could be either detected using a special parameter on the kernel command line (e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Appreciate any help at all thx There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback!
Ah, I understand, makes sense :-) Downstream probably wouldn't like that.
To me the second option seems better, in that case adding framebuffer on such devices upstream would be the same as normally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW I was looking at provisioning the full framebuffer data from the lk2nd, which could include enabling autorefresh as one of the steps. https://github.com/msm8916-mainline/lk2nd/blob/rebase/fb/lk2nd/display/simplefb.c Interestingly upstream allows extending the simplefb bindings just for the bootloader data so theoretically we could even have custom There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, that would be then good try to send a patch :). I suppose we'd have to add our There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, specifically the last part of the long description says firmware may need extra data. However I think we shouldn't hurry extending it in case lk2nd can handle quirks internally, maybe it's nicer to have the required flags in lk2nd's own dts. |
||
writel((BIT(31) | 1), MDP_PP_0_BASE + MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG); | ||
#else | ||
thread_t *thr; | ||
|
||
event_init(&refresh_event, false, EVENT_FLAG_AUTOUNSIGNAL); | ||
|
@@ -53,6 +56,7 @@ static void mdp_cmd_refresh_start(struct fbcon_config *fb) | |
|
||
thread_resume(thr); | ||
fb->update_start = mdp_cmd_signal_refresh; | ||
#endif | ||
} | ||
|
||
bool mdp_start_refresh(struct fbcon_config *fb) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
TARGET := msm8994 | ||
include lk2nd/project/lk2nd.mk | ||
DEFINES += ENABLE_AUTOREFRESH=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the
qcom,ids.h
like all other files around, I also doubt there is a phone with APQ8092 :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True :-) Sorry, I should've checked other examples before adding that, will fix it once I get home