Skip to content

RFC: Commits lost between rpi-4.9.y and rpi-4.14.y #2279

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

Merged
merged 24 commits into from
Nov 21, 2017

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Nov 18, 2017

These are commits that I've found to have been omitted or lost between rpi-4.9.y and rpi-4.14.y. I'm fairly sure some are no longer needed, but I've listed them all here anyway.

@popcornmix, @6by9, @JamesH65, @anholt - can you review (as will I - I've not read them all to sanity check)?

@HiassofT
Copy link
Contributor

"BCM270x DT: expose 3.3V and 5V system rails" isn't needed, that's already present in commit 7070ee4

@pelwell pelwell force-pushed the lostcommits_4.14 branch 4 times, most recently from 9e7be90 to 57419e8 Compare November 19, 2017 11:31
@pelwell
Copy link
Contributor Author

pelwell commented Nov 19, 2017

Agreed - I've removed it from the PR. Thanks.

The old downstream firmware-based thermal driver has been replaced by the upstream equivalent that accesses the hardware directly, so that commit has also been removed, as has the patch enabling the AUX interrupt controller in DT (now moved to bcm270x.dtsi).

The two BRCMDBG-enabling commits have now been squashed into one, but do we need it at all @JamesH65?

The remaining commits are now grouped thematically for easier review and squashing.

@pelwell pelwell force-pushed the lostcommits_4.14 branch 3 times, most recently from e6873a0 to 1370964 Compare November 19, 2017 17:52
@6by9
Copy link
Contributor

6by9 commented Nov 19, 2017

Certainly yes to "BCM_VC_SM: select DMA_SHARED_BUFFER".

I thought I had seen about 3 V4L2 driver patches originally, but not now. Did they disappear? (Yes they ought to be upstreamed - just another job)

@pelwell
Copy link
Contributor Author

pelwell commented Nov 19, 2017

Here are the V4L2 patches - have they been replaced by the upstream driver?

@popcornmix
Copy link
Collaborator

All look correct except the alsa one. There is now an upstream/staging alsa driver in:
drivers/staging/vc04_services/bcm2835-audio
which I believe works. Now it's possible there are missing features or bug fixes, but if so we should probably patch the upstream/staging driver rather than adding a second.

@pelwell
Copy link
Contributor Author

pelwell commented Nov 19, 2017

Thanks - I've dropped the downstream ALSA driver.

@6by9
Copy link
Contributor

6by9 commented Nov 19, 2017

Here are the V4L2 patches - have they been replaced by the upstream driver?

Partially.
The upstream driver is missing the last 4 fixes, hence my comment on needing to upstream them. It's also had a couple of things removed, eg the GStreamer workaround. It's true that GStreamer has been fixed but WebRTC fails due to the same issue so really we still want the workaround to be available. I'll have a think about it tomorrow.

@pelwell
Copy link
Contributor Author

pelwell commented Nov 20, 2017

I've rounded up a few more stray commits.

@6by9 The downstream V4L2 driver uses the same config symbol as the upstream driver - CONFIG_VIDEO_BCM2835. The redefinition triggers warnings, as does the fact that downstream it's a boolean while the 4.14 defconfigs set it to "m". If it's alright with you I propose to merge all the commits except those for the downstream V4L2 driver, and you can upstream the patches at your leisure.

@anholt
Copy link
Contributor

anholt commented Nov 21, 2017

Ack on the vc4/panel changes.

@allocom
Copy link

allocom commented Nov 21, 2017

Hello Pelwell, I see 1 commit of files allo-piano-dac-plus & allo-digione are not included. Any specific reason? Please let me know what should be done to add it back.

@pelwell
Copy link
Contributor Author

pelwell commented Nov 21, 2017

I've squashed three piano-dac-plus commits together, but if you know of some missing commits from 4.14 which aren't in this PR then list them and I'll make sure they are included.

@pelwell
Copy link
Contributor Author

pelwell commented Nov 21, 2017

With this PR applied, all of the 4.14 allo source files now match the 4.9 versions, so I'm satisfied there are no omissions.

@6by9
Copy link
Contributor

6by9 commented Nov 21, 2017

If it's alright with you I propose to merge all the commits except those for the downstream V4L2 driver, and you can upstream the patches at your leisure.

Fine by me.

@allocom
Copy link

allocom commented Nov 21, 2017

3 Commits are missing, #2135, #2224 & #2149

@pelwell
Copy link
Contributor Author

pelwell commented Nov 21, 2017

No - they aren't missing, they are squashed into 55da3a6.

This driver was refactored to use the kernel DMA buffer sharing api
in commit a973908.

Per Documentation/dma-buf-sharing.txt, it must select DMA_SHARED_BUFFER
in its Kconfig.

Signed-off-by: Alistair Buxton <[email protected]>
@JamesH65
Copy link
Contributor

commit 1691393 seems to be missing?

@allocom
Copy link

allocom commented Nov 21, 2017

Ok, but change are not visible on 4.14.y tree.

This driver communicates with the Atmel microcontroller for sequencing
the poweron of the TC358762 DSI-DPI bridge and controlling the
backlight PWM.

The following lines are required in config.txt, to keep the firmware
from trying to bash our I2C lines and steal the DSI interrupts:

    disable_touchscreen=1
    ignore_lcd=2
    mask_gpu_interrupt1=0x1000

This means that the firmware won't power on the panel at boot time (no
rainbow) and the touchscreen input won't work.  The native input
driver for the touchscreen still needs to be written.

v2: Set the same default orientation as the closed source firmware
    used, which is the best for viewing angle.

Signed-off-by: Eric Anholt <[email protected]>
If the i2c driver hadn't pobed before the panel driver probes, then
the client would be NULL but we were looking for an ERR_PTR in the
error case.

Signed-off-by: Eric Anholt <[email protected]>
Commit 488f9bc slightly increased the
reported rate of PLLD, so the clk driver decided that PLLD/3/8 was now
higher than our requested pixel clock rate and rejected it in favor of
PLLD/4/8, which then ran the pixel clock way out of spec.

By bumping the requested clock rate just slightly, we get back to
PLLD/3/8 like we wanted and the panel displays content again.

Signed-off-by: Eric Anholt <[email protected]>
anholt and others added 20 commits November 21, 2017 11:00
This ensures that the screen goes blank during DPMS (screensaver),
including the cursor.  Planes don't necessarily get disabled during
CRTC disable, so we need to be careful to not leave them on or turn
them back on early.

Signed-off-by: Eric Anholt <[email protected]>
The documentation said to use src_w here, and I didn't consider that
we actually needed to be using pitch somewhere in our setup.  Fixes
scanout on my DSI panel when X11 does initial setup with 1920x1080
HDMI and 800x480 DSI both at 0,0 of the same framebuffer.

Signed-off-by: Eric Anholt <[email protected]>
Fixes: 98830d9 ("drm/vc4: Add T-format scanout support.")
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable
ARP offloading when in promiscuous mode, re-enabling the ability to
sniff ARP packets over WiFi.

See: raspberrypi#2171

Signed-off-by: Phil Elwell <[email protected]>
In brcmf_p2p_notify_rx_mgmt_p2p_probereq(), chanspec is assigned before
the length of rxframe is validated.  This could lead to uninitialized
data being accessed (but not printed).  Since we already have a
perfectly good endian-swapped copy of rxframe->chanspec in ch.chspec,
and ch.chspec is not modified by decchspec(), avoid the extra
assignment and use ch.chspec in the debug print.

Suggested-by: Mattias Nissler <[email protected]>
Signed-off-by: Kevin Cernekee <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
brcmf_fweh_process_event() sets event->datalen to the
endian-swapped value of event_packet->msg.datalen, which is the
same as emsg.datalen.  This length is already validated in
brcmf_fweh_process_event(), so there is no need to check it
again upon dequeuing the event.

Suggested-by: Arend van Spriel <[email protected]>
Signed-off-by: Kevin Cernekee <[email protected]>
When dwc_otg is built as a module, build will fail with the following
error:

ERROR: "DWC_TASK_HI_SCHEDULE" [drivers/usb/host/dwc_otg/dwc_otg.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1199: recipe for target 'modules' failed
make: *** [modules] Error 2

Even if the error is solved by including the missing
DWC_TASK_HI_SCHEDULE function, the kernel will panic when loading
dwc_otg.

As a workaround, simply prevent user from building dwc_otg as a module
as the current kernel does not support it.

See: raspberrypi#2258

Signed-off-by: Malik Olivier Boussejra <[email protected]>
Master volume added, which controls both DACs volumes.

See: raspberrypi#2149

Also fix initial max volume, default mode value, and unmute.

Signed-off-by: allocom <[email protected]>
Enable the gpio_wdt module, to support external watchdogs.

See: raspberrypi#2199

Signed-off-by: Phil Elwell <[email protected]>
The Pi 3B rev 1.3 and the Pi Zero W have flow control signals to the
BT modem, which work well using UART0 (a.k.a. ttyAMA0). Because of
this, the pin wired to the modem's CTS line has to be held low in
order for it to transmit data.

Unfortunately the mini-UART (or its driver) appears to have a flow
control issue, causing hciattach to stall during modem initialisation.

As a workaround (potentially short-term), configure GPIO 31 as an
output driving low (the default state for an output).

See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=138223&start=100#p1228339

Signed-off-by: Phil Elwell <[email protected]>
The MCP2515 datasheet clearly describes a level-triggered interrupt
pin. Therefore the receiving interrupt controller must also be
configured for level-triggered operation otherwise there is a danger
of a missed interrupt condition blocking all subsequent interrupts.
The ONESHOT flag ensures that the interrupt is masked until the
threaded interrupt handler exits.

Rather than change the flags globally (they must have worked for at
least one user), allow the flags to be overridden from Device Tree
in the event that the device has a DT node.

See: raspberrypi#2175
     raspberrypi#2263

Signed-off-by: Phil Elwell <[email protected]>
Add support for the ST M41T62 real-time clock chip.
The BCM2835 SPI controllers have a maximum bus clock of half the system
clock speed, so with the 250MHz system clock found on Raspberry Pis
you get a theoretical maximum bus speed of 125MHz. Note that this
speed is unlikely to be reliable, and the maximum usable bus spee will
depend on both the attached device and the wiring.

See: raspberrypi#2165
Signed-off-by: Phil Elwell <[email protected]>
This commit adds the needed kernel config keys and extends the
i2c-sensor-overlay.dts file with support for:
* the Texas Instruments HDC100x temp sensor
* the AMS TSL4531 digital ambient light sensor
* the Vishay VEML6070 ultraviolet light sensor
Driver was using a fixed resolution, this commit
adds touchscreen size, and coordinate flip and swap
features via device tree overlays.

Adds overrides so the VC4 can adjust the DT parameters
appropriately; there is a newer version of the VC4 side
driver that can now set up the appropriate DT values
if required.

Signed-off-by: James Hughes <[email protected]>
@PeterPablo
Copy link

PeterPablo commented Nov 21, 2017 via email

@pelwell pelwell merged commit e5a30c7 into raspberrypi:rpi-4.14.y Nov 21, 2017
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 21, 2017
kernel: Resurrenct commits lost between rpi-4.9.y and rpi-4.14.y
See: raspberrypi/linux#2279

firmware: Update to latest master
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Nov 21, 2017
kernel: Resurrenct commits lost between rpi-4.9.y and rpi-4.14.y
See: raspberrypi/linux#2279

firmware: Update to latest master
@pelwell pelwell deleted the lostcommits_4.14 branch September 15, 2021 07:55
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

Successfully merging this pull request may close these issues.