- 19 11月, 2020 3 次提交
-
-
由 Maxime Ripard 提交于
There's cross-talk on the RPi4 between the 2.4GHz channels used by the WiFi chip and some resolutions, most notably 1440p at 60Hz. In such a case, we can either reject entirely the mode, or lower slightly the pixel frequency to remove the overlap. Let's go for the latter. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Acked-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20201029134018.1948636-2-maxime@cerno.tech
-
由 Maxime Ripard 提交于
The FIFO between the pixelvalve and the HDMI controller runs at 2 pixels per clock cycle, and cannot deal with odd timings. Let's reject any mode with such timings. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201029122522.1917579-2-maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI controller cannot go above a certain pixel rate limit depending on the generations, but that limit is only enforced in mode_valid at the moment, which means that we won't advertise modes that exceed that limit, but the userspace is still free to try to setup a mode that would. Implement atomic_check to make sure we check it in that scenario too. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201029122522.1917579-1-maxime@cerno.tech
-
- 29 10月, 2020 1 次提交
-
-
由 Maxime Ripard 提交于
Since the components for a given device in ASoC are identified by their name, it makes sense to add one even though it's not strictly necessary. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200708144555.718404-1-maxime@cerno.tech
-
- 28 10月, 2020 1 次提交
-
-
由 Maxime Ripard 提交于
When running the trigger hook, ALSA by default will take a spinlock, and thus will run the trigger hook in atomic context. However, our HDMI driver will send the infoframes as part of the trigger hook, and part of that process is to wait for a bit to be cleared for up to 100ms. To be nicer to the system, that wait has some usleep_range that interact poorly with the atomic context. There's several ways we can fix this, but the more obvious one is to make ALSA take a mutex instead by setting the nonatomic flag on the DAI link. That doesn't work though, since now the cyclic callback installed by the dmaengine helpers in ALSA will take a mutex, while that callback is run by dmaengine's virt-chan code in a tasklet where sleeping is not allowed either. Given the delay we need to poll the bit for, changing the usleep_range for a udelay and keep running it from a context where interrupts are disabled is not really a good option either. However, we can move the infoframe setup code in the hw_params hook, like is usually done in other HDMI controllers, that isn't protected by a spinlock and thus where we can sleep. Infoframes will be sent on a regular basis anyway, and since hw_params is where the audio parameters that end up in the infoframes are setup, this also makes a bit more sense. Fixes: bb7d7856 ("drm/vc4: Add HDMI audio support") Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NMark Brown <broonie@kernel.org> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20201027101558.427256-1-maxime@cerno.tech
-
- 10 9月, 2020 1 次提交
-
-
由 Dan Carpenter 提交于
The devm_ioremap() function never returns error pointers, it returns NULL. Fixes: 83239891 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20200910100825.GC79916@mwanda
-
- 09 9月, 2020 1 次提交
-
-
由 Marek Szyprowski 提交于
card->owner is a required property and since commit 81033c6b ("ALSA: core: Warn on empty module") a warning is issued if it is empty. Fix lack of it. This fixes following warning observed on RaspberryPi 3B board with ARM 32bit kernel and multi_v7_defconfig: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 210 at sound/core/init.c:207 snd_card_new+0x378/0x398 [snd] Modules linked in: vc4(+) snd_soc_core ac97_bus snd_pcm_dmaengine bluetooth snd_pcm snd_timer crc32_arm_ce raspberrypi_hwmon snd soundcore ecdh_generic ecc bcm2835_thermal phy_generic CPU: 1 PID: 210 Comm: systemd-udevd Not tainted 5.8.0-rc1-00027-g81033c6b #1087 Hardware name: BCM2835 [<c03113c0>] (unwind_backtrace) from [<c030bcb4>] (show_stack+0x10/0x14) [<c030bcb4>] (show_stack) from [<c071cef8>] (dump_stack+0xd4/0xe8) [<c071cef8>] (dump_stack) from [<c0345bfc>] (__warn+0xdc/0xf4) [<c0345bfc>] (__warn) from [<c0345cc4>] (warn_slowpath_fmt+0xb0/0xb8) [<c0345cc4>] (warn_slowpath_fmt) from [<bf02ff74>] (snd_card_new+0x378/0x398 [snd]) [<bf02ff74>] (snd_card_new [snd]) from [<bf11f0b4>] (snd_soc_bind_card+0x280/0x99c [snd_soc_core]) [<bf11f0b4>] (snd_soc_bind_card [snd_soc_core]) from [<bf12f000>] (devm_snd_soc_register_card+0x34/0x6c [snd_soc_core]) [<bf12f000>] (devm_snd_soc_register_card [snd_soc_core]) from [<bf165654>] (vc4_hdmi_bind+0x43c/0x5f4 [vc4]) [<bf165654>] (vc4_hdmi_bind [vc4]) from [<c09d660c>] (component_bind_all+0xec/0x24c) [<c09d660c>] (component_bind_all) from [<bf15c44c>] (vc4_drm_bind+0xd4/0x174 [vc4]) [<bf15c44c>] (vc4_drm_bind [vc4]) from [<c09d6ac0>] (try_to_bring_up_master+0x160/0x1b0) [<c09d6ac0>] (try_to_bring_up_master) from [<c09d6f38>] (component_master_add_with_match+0xd0/0x104) [<c09d6f38>] (component_master_add_with_match) from [<bf15c588>] (vc4_platform_drm_probe+0x9c/0xbc [vc4]) [<bf15c588>] (vc4_platform_drm_probe [vc4]) from [<c09df740>] (platform_drv_probe+0x6c/0xa4) [<c09df740>] (platform_drv_probe) from [<c09dd6f0>] (really_probe+0x210/0x350) [<c09dd6f0>] (really_probe) from [<c09dd940>] (driver_probe_device+0x5c/0xb4) [<c09dd940>] (driver_probe_device) from [<c09ddb38>] (device_driver_attach+0x58/0x60) [<c09ddb38>] (device_driver_attach) from [<c09ddbc0>] (__driver_attach+0x80/0xbc) [<c09ddbc0>] (__driver_attach) from [<c09db820>] (bus_for_each_dev+0x68/0xb4) [<c09db820>] (bus_for_each_dev) from [<c09dc9f8>] (bus_add_driver+0x130/0x1e8) [<c09dc9f8>] (bus_add_driver) from [<c09de648>] (driver_register+0x78/0x110) [<c09de648>] (driver_register) from [<c0302038>] (do_one_initcall+0x50/0x220) [<c0302038>] (do_one_initcall) from [<c03db544>] (do_init_module+0x60/0x210) [<c03db544>] (do_init_module) from [<c03da4f8>] (load_module+0x1e34/0x2338) [<c03da4f8>] (load_module) from [<c03dac00>] (sys_finit_module+0xac/0xbc) [<c03dac00>] (sys_finit_module) from [<c03000c0>] (ret_fast_syscall+0x0/0x54) Exception stack(0xeded9fa8 to 0xeded9ff0) ... ---[ end trace 6414689569c2bc08 ]--- Fixes: bb7d7856 ("drm/vc4: Add HDMI audio support") Suggested-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20200701073949.28941-1-m.szyprowski@samsung.com
-
- 08 9月, 2020 33 次提交
-
-
由 Maxime Ripard 提交于
Now that the driver is ready for it, let's bring in the HDMI controllers variants for the BCM2711. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/b540c7a9ebb7ad51da39271a8388b69c7e27e582.1599120059.git-series.maxime@cerno.tech
-
由 Hoegeun Kwon 提交于
The BCM2711 has another clock that needs to be ramped up depending on the pixel rate: the pixel BVB clock. Add the code to adjust that clock when changing the mode. [Maxime: Changed the commit log, used clk_set_min_rate] Signed-off-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20200901040759.29992-3-hoegeun.kwon@samsung.com Link: https://patchwork.freedesktop.org/patch/msgid/d757ddd6549da140f178563e5fd2bf1d129913fd.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
In order to avoid pixels getting stuck in an unflushable FIFO, we need when we disable the HDMI controller to switch away from getting our pixels from the pixelvalve and instead use blank pixels, and switch back to the pixelvalve when we enable the HDMI controller. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/fde3efb1ad79f4476a73d310cbba3ec07dc6dabe.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The VID_CTL setup is done in several places in the driver even though it's not really required. Let's simplify it a bit to do the configuration in one go. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/08e7ebb605a560fcc149b69b4af52753a7870b2f.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
In order to prevent some pixels getting stuck in an unflushable FIFO on bcm2711, we need to enable the HVS, the pixelvalve (the CRTC) and the HDMI controller (the encoder) in an intertwined way, and with tight delays. However, the atomic callbacks don't really provide a way to work with either constraints, so we need to roll our own callbacks so that we can provide those guarantees. Since those callbacks have been implemented and called in the CRTC code, we can just implement them in the HDMI driver now. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/2e9226d971117065f3b97e597f04f7fe2f0c134c.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
In order to avoid a pixel getting stuck in an unflushable FIFO, we need to recenter the FIFO every time we're doing a modeset and not only if we're connected to an HDMI monitor. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/b3faaf05ac6c4d3c364d28fa441571eb85903269.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The current code has some logic, disabled by default, to dump the register setup in the HDMI controller. However, since we're going to split those functions in multiple, shorter, functions that only make sense where they are called in sequence, keeping the register dump makes little sense. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/c8c8d388f2d32fc3536336be36d003a862487eb7.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI driver was registering a single ALSA card so far with the name vc4-hdmi. Obviously, this is not going to work anymore when we will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/e60a37444e848a384a45707a21d6df8883115f86.1599120059.git-series.maxime@cerno.tech
-
由 Dave Stevenson 提交于
The audio configuration has changed for the BCM2711, with notably a different parent clock and a different channel configuration. Make that modular to be able to support the BCM2711. Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Link: https://patchwork.freedesktop.org/patch/msgid/85a8ca721c2d800be758c55870cea98536749680.1599120059.git-series.maxime@cerno.tech
-
由 Dave Stevenson 提交于
ALSA's iec958 plugin by default sets the block start preamble to 8, whilst this driver was programming the hardware to expect 0xF. Amend the hardware config to match ALSA. Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Link: https://patchwork.freedesktop.org/patch/msgid/d0b126deb228baf1244c91e02ac0a8f7c9c60dc5.1599120059.git-series.maxime@cerno.tech
-
由 Dave Stevenson 提交于
If the encoder is disabled and re-enabled (eg mode change) all infoframes are reset, whilst the audio subsystem know nothing about this change. The driver therefore needs to reinstate the audio infoframe for itself. Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Link: https://patchwork.freedesktop.org/patch/msgid/cd579ccc2c9b9d2fce0ebaf32f847cedb0e4a7a2.1599120059.git-series.maxime@cerno.tech
-
由 Dave Stevenson 提交于
The register range used for audio setup in the previous generations of SoC were always the second range in the device tree. However, now that the BCM2711 has way more register ranges, it makes sense to retrieve it by names for it, while preserving the id-based lookup as a fallback. Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Link: https://patchwork.freedesktop.org/patch/msgid/a1ba5605fe1006a1ead5262ef3d66ea5d0750381.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HSM clock needs to be running at 101% the pixel clock of the HDMI controller, however it's shared between the two HDMI controllers, which means that if the resolutions are different between the two HDMI controllers, and the lowest resolution is on the second (in enable order) controller, the first HDMI controller will end up with a smaller than expected clock rate. Since we don't really need an exact frequency there, we can simply change the minimum rate we expect instead. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/821992209cc0d7a83254bf26fe2bf507ef0994d2.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HSM clock needs to be setup at around 101% of the pixel rate. This was done previously by setting the clock rate to 163.7MHz at probe time and only check in mode_valid whether the mode pixel clock was under the pixel clock +1% or not. However, with 4k we need to change that frequency to a higher frequency than 163.7MHz, and yet want to have the lowest clock as possible to have a decent power saving. Let's change that logic a bit by setting the clock rate of the HSM clock to the pixel rate at encoder_enable time. This would work for the BCM2711 that support 4k resolutions and has a clock that can provide it, but we still have to take care of a 4k panel plugged on a BCM283x SoCs that wouldn't be able to use those modes, so let's define the limit in the variant. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/7e692ddc231d33dd671e70ea04dd1dcf56c1ecb3.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The mode_valid hook on the encoder uses a pointer to a drm_encoder called crtc, which is pretty confusing. Let's rename it to encoder to make it clear what it is. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/7fbabab03992efe4a3a3640ac5ee2bb49b1c7338.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The CEC_CLOCK_DIV define is not used anywhere in the driver, let's remove it. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/53805cc47e99a137e5f08c92fb781cc2e2134299.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Similarly to the audio support, CEC support is not there yet for the BCM2711, so let's skip entirely the CEC initialization through a variant flag. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/bd0c4afa83b4e121692352cdc2dd1886162c7552.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The CEC init code was put directly into the bind function, which was quite inconsistent with how the audio support was done, and would prevent us from further changes to skip that initialisation entirely. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/21f4717e076291522d0784a7fd3774d8e97eaf01.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI driver was registering a single debugfs file so far with the name hdmi_regs. Obviously, this is not going to work anymore when will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/9505c1eb40b3ef3709277bf9e8af77917b249c32.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The vc4 CRTC will use the encoder type to control its output clock muxing. However, this will be different from HDMI0 to HDMI1, so let's store our type in the variant structure so that we can support multiple controllers later on. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/2736a86b498551ba9dbc5803c5bb910627a2550c.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Similarly to the previous patches, the timings setup in the HDMI controller of the BCM2711 is slightly different, mostly because it supports higher resolutions and thus needed more spaces for the various timings, resulting in the register layout changing. Let's add a callback for that as well. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/0cfcbb379212f90b4abc76c0ccf3b90d1d7c0268.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Similarly to the previous patches, the CSC setup is slightly different in the BCM2711 than in the previous generations. Let's add a callback for it. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/5c19bbf10153cb42ca0fb67e08606c8295c17236.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Let's continue the implementation of hooks for the parts that change in the BCM2711 SoC with the PHY RNG setup. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/216155f1c0b83e622ac60a2f7d00eb707de3acba.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI PHY in the BCM2711 HDMI controller is significantly more complicated to setup than in the older BCM283x SoCs. Let's add hooks to enable and disable the PHY. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/7216826284dbc60a58bdacd662805d20699e5c80.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The BCM2711 and BCM283x HDMI controllers use a slightly different reset sequence, so let's add a callback to reset the controller. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/a34bcb493da07eae58ed704f65e72ce0748e8952.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI controllers found in the BCM2711 have most of the registers reorganized in multiple registers areas and at different offsets than previously found. The logic however remains pretty much the same, so it doesn't really make sense to create a whole new driver and we should share the code as much as possible. Let's implement some indirection to wrap around a register and depending on the variant will lookup the associated register on that particular variant. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/3070236daff920e7edd11c5a72ac31fd0f6a656b.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The HDMI controllers found in the BCM2711 has a pretty different clock and registers areas than found in the older BCM283x SoCs. Let's create a variant structure to store the various adjustments we'll need later on, and a function to get the resources needed for one particular version. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/71cfa3ce3d865bbab52a0e5651bc052dc4893f11.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The vc4_hdmi_connector was only used to switch between drm_connector to drm_encoder. However, we can now use vc4_hdmi to do the switch, so that structure is redundant. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/aee5120728db350b19c074de4290eafaf01e6671.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Now that we don't have any users anymore, we can kill that pointer. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/d7ebf50319bbd902e4b7b7c39ae1612c3b38e6b2.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The unbind function needs to retrieve a vc4_hdmi structure pointer through the struct device that we're given since we want to support multiple HDMI controllers. However, our optional ASoC support doesn't make that trivial since it will overwrite the device drvdata if we use it, but obviously won't if we don't use it. Let's make sure the fields are at the proper offset to be able to cast between the snd_soc_card structure and the vc4_hdmi structure transparently so we can support both cases. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/717082cba06b5c06280f26c56c08aee512365ed3.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Our CEC code also retrieves the associated vc4_hdmi by setting the vc4_dev pointer as its private data, and then dereferences its vc4_hdmi pointer. In order to eventually get rid of that pointer, we can simply pass the vc4_hdmi pointer directly. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/cb575cb9e13018bce131b8535e5b572dc1027877.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
Whenever the code needs to access the vc4_hdmi structure from a DRM connector or encoder, it first accesses the drm_device associated to the connector, then retrieve the drm_dev private data which gives it a pointer to our vc4_dev, and will finally follow the vc4_hdmi pointer in that structure. That will also give us some trouble when having multiple controllers, but now that we have our encoder and connector structures that are part of vc4_hdmi, we can simply call container_of on the DRM connector or encoder and retrieve the vc4_hdmi structure directly. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/536ecce5898ea75839fa3788b876009d69a5ccae.1599120059.git-series.maxime@cerno.tech
-
由 Maxime Ripard 提交于
The function vc4_hdmi_connector_detect access its vc4_hdmi struct by dereferencing the pointer in the structure vc4_dev. This will cause some issues when we will have multiple HDMI controllers, so let's just use the local variable for now instead of dereferencing that pointer all the time, and we'll fix the local variable later. Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Tested-by: NHoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/ef92c5582d3b2894128b2272a8ada7cbc20be3d9.1599120059.git-series.maxime@cerno.tech
-