As you did not provide a pcf file, I tried the pin assignments both ways when it wasn't working. I believe I did have it working in the same order as you in one working build, but I do not seem to be able to reproduce that now.
This is my current pcf file:
set_io clk100 129
set_io hdmi_p 94
set_io hdmi_p 91
set_io hdmi_p 88
set_io hdmi_p 85
What Pmod are you using and it which order?
I also cannot get your new code to work at the moment. I get no signal from it. Whether builds work with nextpnr seems to depend on the --freq that I set.
This is my current Makefile:
VERILOG_FILES = minimalDVID_encoder.v
chip.bin: $(VERILOG_FILES) hdmi.pcf
yosys -q -p "synth_ice40 -json chip.json" $(VERILOG_FILES)
# arachne-pnr -d 8k -P tq144:4k -p hdmi.pcf chip.blif -o chip.txt
nextpnr-ice40 --freq 125 --hx8k --package tq144:4k --json chip.json --pcf hdmi.pcf --asc chip.txt --opt-timing
icetime -d hx8k -P tq144:4k chip.txt
icepack chip.txt chip.bin
cat chip.bin >/dev/ttyACM0
$(RM) -f chip.blif chip.txt chip.ex chip.bin waves.vcd tb