Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jobs:
container: devkitpro/devkita64:latest

steps:
- name: Install 7z
run: sudo apt update && sudo apt install -y p7zip-full

- uses: actions/checkout@v1
with:
submodules: recursive
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
misc/patches
misc/icon.svg
!misc/default.ini

.DS_Store
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ MODULES = application sysmodule overlay
all: $(MODULES)
@:

dist: $(DIST_TARGET)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you please restore this target? It avoids rebuilding the zip if it's already up to date.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason I changed that is because the dist target gets cached, and as long as the name remains the same (as is xxx-dirty), it will not be rebuilt even if the underlying source changes. I got bitten by that myself. Alternatively we can do something like:

DIST_INPUTS       =    application/out/Fizeau.nro                          \
                       overlay/out/Fizeau.ovl                              \
                       sysmodule/out/Fizeau.nsp                            \
                       sysmodule/toolbox.json                              \
                       misc/default.ini                                    \
                       $(wildcard misc/patches/*.ips)

dist: all
	@$(MAKE) -s $(DIST_TARGET) --no-print-directory

$(DIST_TARGET): $(DIST_INPUTS)

Let me know what you prefer.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ah true, there aren't any deps specified. I guess in this case it can be left as is, thanks for the explanation.

@:

$(DIST_TARGET): | all
dist: | all
@rm -rf $(OUT)/Fizeau-*-*.zip

@mkdir -p $(OUT)/config/Fizeau
Expand All @@ -47,9 +44,9 @@ $(DIST_TARGET): | all
@mkdir -p $(OUT)/atmosphere/exefs_patches/nvnflinger_cmu
@cp misc/patches/*.ips $(OUT)/atmosphere/exefs_patches/nvnflinger_cmu || :

@7z a $@ ./$(OUT)/atmosphere ./$(OUT)/config ./$(OUT)/switch >/dev/null
@cd $(OUT) && zip -qr $(notdir $(DIST_TARGET)) atmosphere config switch -x "*.DS_Store"
@rm -r $(OUT)/atmosphere $(OUT)/config $(OUT)/switch
@echo Compressed release to $@
@echo Compressed release to $(DIST_TARGET)

clean:
@rm -rf out
Expand Down
4 changes: 4 additions & 0 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

docker run --rm --name devkitpro-fizeau -v .:/mnt/ devkitpro/devkita64:20260215 sh -c "git config --global --add safe.directory /mnt && cd /mnt/ && make -C common -j\$(nproc) && make -j\$(nproc) dist"
4 changes: 2 additions & 2 deletions sysmodule/src/nvdisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Result DisplayController::disable(bool external) const {
if (auto rc = nvioctlNvDisp_SetCmu(!external ? this->disp0_fd : this->disp1_fd, &cmu))
return rc;

if (external)
if (!external)
return 0;

AviInfoframe infoframe;
Expand Down Expand Up @@ -111,7 +111,7 @@ Result DisplayController::apply_color_profile(bool external, FizeauSettings &set
}

Result DisplayController::set_hdmi_color_range(bool external, ColorRange range) const {
if (external)
if (!external)
return 0;

auto is_limited = [](const ColorRange &range) {
Expand Down
8 changes: 5 additions & 3 deletions sysmodule/src/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ void ProfileManager::transition_thread_func(void *args) {

// CMU resets
if (!need_apply) {
if (!(READ(self->clock_va_base + CLK_RST_CONTROLLER_CLK_OUT_ENB_L) & (CLK_ENB_DISP1 | CLK_ENB_DISP2)) ||
// Check the clock for the specific head we are about to poll: reading the
// registers of a clock-gated module stalls the bus, hanging the core (#104)
if (!(READ(self->clock_va_base + CLK_RST_CONTROLLER_CLK_OUT_ENB_L) & (is_handheld ? CLK_ENB_DISP1 : CLK_ENB_DISP2)) ||
!mutexTryLock(&self->commit_mutex))
goto cmu_end;

Expand Down Expand Up @@ -148,10 +150,10 @@ void ProfileManager::transition_thread_func(void *args) {
std::uint64_t timeout = to_timestamp(profile.dimming_timeout),
delta = armTicksToNs(armGetSystemTick() - self->activity_tick) / std::chrono::nanoseconds(1s).count();

if (
if (timeout && (
(!self->is_dimming && delta > timeout) ||
( self->is_dimming && delta <= timeout)
)
))
need_apply = true;
}

Expand Down
Loading