Skip to content
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

overscan trouble after update #3059

Closed
sergiopoverony opened this issue Jul 8, 2019 · 9 comments
Closed

overscan trouble after update #3059

sergiopoverony opened this issue Jul 8, 2019 · 9 comments

Comments

@sergiopoverony
Copy link

https://retropie.org.uk/forum/topic/22790/overscan_-not-work-after-update-4-5-in-emulationstation

@6by9
Copy link
Contributor

6by9 commented Jul 8, 2019

You get presented with a template when you create a new issue. Please use it.

If using a Pi4 then overscan is not currently supported through FKMS, and never has been through FKMS/KMS on Pi0-3.

@sergiopoverony
Copy link
Author

You get presented with a template when you create a new issue. Please use it.

If using a Pi4 then overscan is not currently supported through FKMS, and never has been through FKMS/KMS on Pi0-3.

Pi3A+, Pi3B+, PiZeroW

@popcornmix
Copy link
Collaborator

I think from reading the linked thread that overscan_scale=1 stopped working with a recent update.
(I believe legacy mode - console is okay, but dispmanx layers aren't scaled).

A clear description of the issue would be helpful.

@sergiopoverony
Copy link
Author

A clear description of the issue would be helpful.

delete overscan_scale=1 ot not,,, any time this bug, I think this is bug from prepi4
In forum more users can have bug

@6by9
Copy link
Contributor

6by9 commented Jul 9, 2019

delete overscan_scale=1 ot not,,, any time this bug, I think this is bug from prepi4
In forum more users can have bug

I know English may not be your first language, but that makes no sense.
There may well be a bug, but you have still not provided any details.

In the template it asks for the following system information.

System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a > pastebin link, or add answers to the following questions:

  • Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
  • Which OS and version (cat /etc/rpi-issue)?
  • Which firmware version (vcgencmd version)?
  • Which kernel version (uname -a)?

Logs
If applicable, add the relevant output from dmesg or similar.

Additional context
Add any other relevant context for the problem.

You've provided the model, but nothing else.

I can have a guess at what you're doing, but without more information from you I won't be investigating beyond my current ongoing developments.

I'm guessing that you have dtoverlay=vc4-fkms-v3d in config.txt to load the fkms driver (dmesg would have confirmed this). FKMS has been significantly updated to use the mainline kernel mode selection, however this means that the firmware has no chance to intercept the requested mode and trim it for overscan. (My earlier statement was wrong, previous versions of FKMS would present the trimmed framebuffer size as the one mode).
The mainline Linux kernel has only gained overscan support in the 5.1 release, and even then it is only scaling the planes (effectively overscan_scale=1 always). I am looking at backporting it, but it isn't ready yet.

The issue I have with that is that lots of the forums posts are referencing fbset, which is for the old framebuffer API. WIthout a clear description of what you are trying to do and how it is set up, I'll be chasing my tail looking through the whole system.

@sergiopoverony
Copy link
Author

  1. Raspberry Pi 3A+, 3B, 3B+, Zero W
  2. Raspberry Pi reference 2018-03-13
    Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 00013d7972122d1304aacda8fff5098f073ceb43, stage2
  3. Jun 20 2019 16:12:41
    Copyright (c) 2012 Broadcom
    version a59fb7a74180be0111dbc5c18a37ec6df86f14a3 (clean) (release) (start)
  4. Linux retropie 4.19.50+ dts: overlay: add generic support for ads7846 #896 Thu Jun 20 16:09:52 BST 2019 armv6l GNU/Linux

Config special big digits for overlay_left https://pastebin.com/SN7183V3
Dmesg - https://pastebin.com/hEEHTxLX

dtoverlay=vc4-fkms-v3d - not used

GO ON )

@6by9
Copy link
Contributor

6by9 commented Jul 10, 2019

Testing with Raspbian, all looks fine.

As per raspberrypi/firmware#591 (comment), what are you expecting negative overscan offsets to achieve? They are absolute offsets against the defined dispay mode, so negative means part of the frame buffer is never displayed.

overscan_[left|top|right|bottom] all seem to work sensibly for me as long as disable_overscan=0.

Reading the code in more detail, it appears to also be disabled for DMT display modes (ie hdmi_group=2). That seems logical as DMT are intended for monitors which should never underscan, only CEA TV modes should ever underscan.
The same condition was in the old code, but various things have been shifted around for the multiple frame buffer support, therefore behaviour may have changed.

@6by9
Copy link
Contributor

6by9 commented Jul 10, 2019

OK, I now vaguely understand the code, and the behaviour has changed slightly.

disable_overscan=1 used to disable the level of overscan that the firmware would apply on CEA modes. This is 32 pixels for modes <1280 wide, or 48 pixels otherwise.

overscan_[left|top|right|bottom] were on top of the firmware applied overscan, therefore negative values will reduce the firmware's overscan, but clipped at 0 adjustment. (The better solution is to set disable_overscan=1 and set your own absolute values).

With latest firmwares disable_overscan=1 disables overscan totally, and overscan is automatically disabled on DMT modes.

From your report I still can't tell whether this is actually your problem, but patches are up to reinstate that behaviour.

@sergiopoverony
Copy link
Author

OK, I now vaguely understand the code, and the behaviour has changed slightly.

Now i understand. Thank you

popcornmix added a commit to raspberrypi/firmware that referenced this issue Jul 15, 2019
kernel: i2c: bcm2835: Set clock-stretch timeout to 35ms
See: raspberrypi/linux#3064

kernel: xhci: add quirk for host controllers that don't update endpoint DCS
See: raspberrypi/linux#3060

kernel: tty: amba-pl011: Make TX optimisation conditional
See: #1017

kernel: overlays: Add real parameters to the rpi-poe overlay
kernel: overlays: Correct gpio-fan gpio flags for 4.19
See: raspberrypi/linux#2715

kernel: overlays: i2c-gpio: Fix the bus parameter
See: raspberrypi/linux#3062

kernel: overlays: Rename pi3- overlays to be less model-specific
See: raspberrypi/linux#3052

firmware: dispmanx: Fix handling of disable_overscan to not disable it totally
See: raspberrypi/linux#3059

firmware: power: Enable/disable H264 and ISP clocks with domain

firmware: arm_loader: arm_64bit=0 should disable loading of kernel8.img

firmware: dt-blob: CM has no activity LED
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jul 15, 2019
kernel: i2c: bcm2835: Set clock-stretch timeout to 35ms
See: raspberrypi/linux#3064

kernel: xhci: add quirk for host controllers that don't update endpoint DCS
See: raspberrypi/linux#3060

kernel: tty: amba-pl011: Make TX optimisation conditional
See: raspberrypi/firmware#1017

kernel: overlays: Add real parameters to the rpi-poe overlay
kernel: overlays: Correct gpio-fan gpio flags for 4.19
See: raspberrypi/linux#2715

kernel: overlays: i2c-gpio: Fix the bus parameter
See: raspberrypi/linux#3062

kernel: overlays: Rename pi3- overlays to be less model-specific
See: raspberrypi/linux#3052

firmware: dispmanx: Fix handling of disable_overscan to not disable it totally
See: raspberrypi/linux#3059

firmware: power: Enable/disable H264 and ISP clocks with domain

firmware: arm_loader: arm_64bit=0 should disable loading of kernel8.img

firmware: dt-blob: CM has no activity LED
mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Oct 6, 2019
- firmware: camera/image_encode: Add timestamp to frames encoded with image_encode
  See: raspberrypi/linux#2351

- firmware: camera_subsystem: Clean up disable_camera_led handling

- firmware: smservice: Add defines for VPU allocations
- smservice: Add support for reporting the supported version to the host

- firmware: Camplus: cdi: Remove requirement for calibration functions

- firmware: isp: Reinstate lres shift parameter accidentally dropped with gamma changes
  See: #1108

- firmware: mmal_ril: List all 4 Bayer orders if the IL component says it supports Bayer

- firmware: raspivid: Stop --raw option resetting --raw-format to YUV
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=189830&start=25#p1432589

- firmware: Fixed up overflow in microsecond timer
  See: raspberrypi/userland#535

- firmware: smservice: Avoid a double free

- firmware: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: isp_tuners: Fix memory leak in error path

- firmware: testc: Fix dps parsing

- firmware: camera_subsystem: Fix hardware sync pulses off disable_camera_led

- firmware: Replace the remaining direct users of C(mask_gpu_interrupt[0|1])

- firmware: arm_display: Kick transposer for the rainbow screen if required
- firmware: dispmanx: Do not allow transpose if using Full KMS
  See: raspberrypi/linux#2891

- firmware: Revert: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: arm_loader: Further conditionals for passing in a frame buffer

- firmware: di_adv: Drop back to fast if QPUs are masked off

- firmware: Fix AWB exception bug

- firmware: Updates for Pi4

- firmware: Add missing licence file

- firmware: 2711: CORE, EMMC & BVB clock updates for WiFi / 4Kp60
- firmware: 711: Use boost instead of fixed freq for 4Kp60

- firmware: hvs: Emulate the EOLn interrupt with a timer reset from VSTART
  See: #1154

- firmware: Add support for Rec2020 colour space in vc_image, IL, and MMAL

- firmware: Fix composite mode on devices up to Pi3B+
  See: #1166

- firmware: Fixes for core_freq_min causing failure on HDMI1
  See: http://git/vc4/vc4/merge_requests/529

- firmware: hdmi: Don't release previous boost until mode set is complete
  See: #1159

- firmware: bcm_host: Adjust for 64-bit physical addresses
  See: #1161

- firmware: arm_loader: Shrink most stubs back to 256 bytes, add arm64 GIC stub
  See: raspberrypi/linux#3032

- firmware: arm_dispmanx: Add support for setting the colour encoding

- firmware: dmalib: Fix Lite channel interrupt usage, and macro name

- firmware: Force overscan off when using LCDs
  See: #1173

- firmware: cec: Fix crash when using CEC with HDMI1

- firmware: arm_display: Fix race condition initialising CEC

- firmware: hdmi: Always use boost frequency for initial mode set
  See: #1159

- firmware: AWB: Fix usage for IR operation
  See: #1167

- firmware: arm_loader: Support CLOCK_EMMC2 from GET_CLOCK_RATE
  See: #1179

- firmware: arm_loader: Force word alignment for the DTB
  See: #1175

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: Assorted minor fixes for tvservice -o

- firmware: Rename hdmi_enable_4k to hdmi_enable_4kp60

- firmware: Revert: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: dispmanx: Fix handling of disable_overscan to not disable it totally
  See: raspberrypi/linux#3059

- firmware: power: Enable/disable H264 and ISP clocks with domain

- firmware: arm_loader: arm_64bit=0 should disable loading of kernel8.img

- firmware: dt-blob: CM has no activity LED

- firmware: AWB updates
  See: #1167

-firmware: Change order of display remapping for default display number

- firmware: AWB: Set default number of stats regions for RPi AWB
  See: #1198

- firmware: Fix composite interrupt HVS channel

- firmware: scalarlib: Fix width setting for SCALERLIB_PIXEL_FORMAT_YUV10COL

- firmware: vcmailbox: Add a new SET_AUDIO_LDO_STATE mailbox command

- firmware: Add mailbox call to report the HDMI timings

- firmware: H264: Set the decoder cache AXI burst length to the same as the encoder

- firmware: gencmd: Fix gencmd max result length
- firmware: bootloader_config: New gencmd to read the EEPROM config

- firmware: pwm_audio: Use PWM1 on BCM2838 unless remapped
  See: #1178

- firmware: Fixups for missing code changes from Pi4 branch
  See: #1201

- firmware: pwm_audio: Use the correct DREQs on Pi4
  See: #1214

- firmware: pixelvalve_2711: Alter back porch for widths of 1366
  See: #1202

- firmware: Clear the SMIDSW1 display interrupt flag on startup

- firmware: dt-blob: Declare Pi 4B's SD_IO voltage selector

- firmware: Fix to allow HDMI audio port route setting
  See: raspberrypi/linux#3100

- firmware: AWB: Allow user to set manual gains for the RPi algorithm

- firmware: arm_loader: Fix disabling of audio before reboot

- firmware: fixed up the custom CVT values to use correct group

- firmware: hdmi: Add independent table entries for hdmi_timings on each display
  See: #1218

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: arm_loader: Use platform_get_min_core_voltage for actual min voltage

- firmware: clock: Remember disable state across clock changes

- firmware: platform: pi4: Reduce min core voltage to 810mV

- firmware: arm_dt: Use boost to force turbo mode rather than modifying core_freq_min for uart

- firmware: arm_loader: Add optional flag to add_boost and get_boost calls

- firmware: avs_2711: Move margin from init structure to run time

- firmware: platform: fix get_min_default

- firmware: arm_loader: Use AP_CLOCK_T for clock_iterator for easier debugging

- firmware: AWB: Fix for manual WB settings in capture
  See: #1215

- firmware: sdhost_arasan: Disable busy wait on EMMC_STATUS_NEW_CARD_DATA_SET

- firmware: power: Add 2711-specific PMIC compensation values

- firmware: platform: Remove 10mV of margin

- firmware: Revamp file loading logic

- firmware: power: Allow reading uncached voltage

- firmware: arm_loader: Request KMS to use CVT timings

- firmware: vc_image: Default YUVUV to non-tall mode, with flag if required

- firmware: ldconfig: Implement [pi2/pi3/pi3+] using board types
  See: #1242

- firmware: Avoid defaulting to 64-bit kernel on older Pi

- firmware: Port file loading revamp to master

- firmware: platform: Set up emmc clock earlier

- firmware: hdmi: Implement platform_display_power on 2711
  See: #1224

- firmware: arm_loader: Pass overscan settings to the kernel

- firmware: arm_loader: Add option disable_fw_kms_setup to stop FKMS setup by FW

- firmware: hdmi: Use pixel clock multiplier to determine the core clock

- firmware: Fixups for composite output mode
  See: #1223

- firmware: platform: Allow display_power to be queried from gencmd
  See: #1224

- firmware: arm_loader: Fix no-DT and upstream handling
  See: #1250

- firmware: Round up HDMI0 minimum core clock

- firmware: board_info: Support bcm2710- and bcm2837- Pi 2 DTBs
  See: raspberrypi/linux#3234

- firmware: power: bcm2711: Rescale the GPIO pad power

- firmware: brfs: Add GENET driver for 2711

- firmware: bootloader_state: Add network state and bootmode configuration

- firmware: bootloader_state: Fix mask for EEPROM header magic

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: ldconfig: Support [edid=*] to mean any HDMI monitor
  See: #1136

- firmware: image_fx: Remove restriction that output stride must match input stride

- firmware: image_fx: Remove spamming log line

- firmware: platform: Switch to divide by one when arm_freq exceeds 2GHz

- firmware: Add EMMC support to 2711 Arasan EMMC driver

- firmware: arm_loader: Use /memory@0 if found
  See: raspberrypi/linux#3244

- firmware: bootloader_state: Fix length for bootloader_config

- firmware: arasan_emmc: Fix STB_GPIOOVERRIDE for MMC1 in network boot

- firmware: bfs: Verify that eth FS has not been closed before using
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants