stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Maxime Ripard <maxime@cerno.tech>
Subject: [PATCH 6.1 079/118] drm/vc4: Fix YUV plane handling when planes are in different buffers
Date: Mon, 20 Feb 2023 14:36:35 +0100	[thread overview]
Message-ID: <20230220133603.574607411@linuxfoundation.org> (raw)
In-Reply-To: <20230220133600.368809650@linuxfoundation.org>

From: Dave Stevenson <dave.stevenson@raspberrypi.com>

commit 6b77b16de75a6efc0870b1fa467209387cbee8f3 upstream.

YUV images can either be presented as one allocation with offsets
for the different planes, or multiple allocations with 0 offsets.

The driver only ever calls drm_fb_[dma|cma]_get_gem_obj with plane
index 0, therefore any application using the second approach was
incorrectly rendered.

Correctly determine the address for each plane, removing the
assumption that the base address is the same for each.

Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230127155708.454704-1-maxime@cerno.tech
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/vc4/vc4_plane.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -340,7 +340,7 @@ static int vc4_plane_setup_clipping_and_
 {
 	struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
 	struct drm_framebuffer *fb = state->fb;
-	struct drm_gem_dma_object *bo = drm_fb_dma_get_gem_obj(fb, 0);
+	struct drm_gem_dma_object *bo;
 	int num_planes = fb->format->num_planes;
 	struct drm_crtc_state *crtc_state;
 	u32 h_subsample = fb->format->hsub;
@@ -359,8 +359,10 @@ static int vc4_plane_setup_clipping_and_
 	if (ret)
 		return ret;
 
-	for (i = 0; i < num_planes; i++)
+	for (i = 0; i < num_planes; i++) {
+		bo = drm_fb_dma_get_gem_obj(fb, i);
 		vc4_state->offsets[i] = bo->dma_addr + fb->offsets[i];
+	}
 
 	/*
 	 * We don't support subpixel source positioning for scaling,



  parent reply	other threads:[~2023-02-20 14:00 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 13:35 [PATCH 6.1 000/118] 6.1.13-rc1 review Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 001/118] mptcp: sockopt: make tcp_fastopen_connect generic Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 002/118] mptcp: fix locking for setsockopt corner-case Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 003/118] mptcp: deduplicate error paths on endpoint creation Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 004/118] mptcp: fix locking for in-kernel listener creation Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 005/118] btrfs: move the auto defrag code to defrag.c Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 006/118] btrfs: lock the inode in shared mode before starting fiemap Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 007/118] ASoC: amd: yc: Add DMI support for new acer/emdoor platforms Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 008/118] ASoC: SOF: sof-audio: start with the right widget type Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 009/118] ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 010/118] ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 011/118] ASoC: Intel: sof_cs42l42: " Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 012/118] ASoC: Intel: sof_nau8825: " Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 013/118] ASoC: Intel: sof_ssp_amp: " Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 014/118] selftests/bpf: Verify copy_register_state() preserves parent/live fields Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 015/118] ALSA: hda: Do not unset preset when cleaning up codec Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 016/118] ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 017/118] bpf, sockmap: Dont let sock_map_{close,destroy,unhash} call itself Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 018/118] ASoC: cs42l56: fix DT probe Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 019/118] tools/virtio: fix the vringh test for virtio ring changes Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 020/118] vdpa: ifcvf: Do proper cleanup if IFCVF init fails Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 021/118] net/rose: Fix to not accept on connected socket Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 022/118] selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 023/118] net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 024/118] powerpc/64: Fix perf profiling asynchronous interrupt handlers Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 025/118] fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 026/118] drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 027/118] net: ethernet: mtk_eth_soc: Avoid truncating allocation Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 028/118] net: sched: sch: Bounds check priority Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 029/118] s390/decompressor: specify __decompress() buf len to avoid overflow Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 030/118] nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 031/118] nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 032/118] nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 033/118] drm/amd/display: Add missing brackets in calculation Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 034/118] drm/amd/display: Adjust downscaling limits for dcn314 Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 035/118] drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2 Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 036/118] drm/amd/display: Reset DMUB mailbox SW state after HW reset Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 037/118] drm/amdgpu: enable HDP SD for gfx 11.0.3 Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 038/118] drm/amdgpu: Enable vclk dclk node for gc11.0.3 Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 039/118] drm/amd/display: Properly handle additional cases where DCN is not supported Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 040/118] platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 041/118] ceph: move mount state enum to super.h Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 042/118] ceph: blocklist the kclient when receiving corrupted snap trace Greg Kroah-Hartman
2023-02-20 13:35 ` [PATCH 6.1 043/118] selftests: mptcp: userspace: fix v4-v6 test in v6.1 Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 044/118] of: reserved_mem: Have kmemleak ignore dynamically allocated reserved mem Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 045/118] kasan: fix Oops due to missing calls to kasan_arch_is_ready() Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 046/118] mm: shrinkers: fix deadlock in shrinker debugfs Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 047/118] aio: fix mremap after fork null-deref Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 048/118] vmxnet3: move rss code block under eop descriptor Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 049/118] fbdev: Fix invalid page access after closing deferred I/O devices Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 050/118] drm: Disable dynamic debug as broken Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 051/118] drm/amd/amdgpu: fix warning during suspend Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 052/118] drm/amd/display: Fail atomic_check early on normalize_zpos error Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 053/118] drm/vmwgfx: Stop accessing buffer objects which failed init Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 054/118] drm/vmwgfx: Do not drop the reference to the handle too soon Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 055/118] mmc: jz4740: Work around bug on JZ4760(B) Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 056/118] mmc: meson-gx: fix SDIO mode if cap_sdio_irq isnt set Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 057/118] mmc: sdio: fix possible resource leaks in some error paths Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 058/118] mmc: mmc_spi: fix error handling in mmc_spi_probe() Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 059/118] ALSA: hda: Fix codec device field initializan Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 060/118] ALSA: hda/conexant: add a new hda codec SN6180 Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 061/118] ALSA: hda/realtek - fixed wrong gpio assigned Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 062/118] ALSA: hda/realtek: fix mute/micmute LEDs dont work for a HP platform Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 063/118] ALSA: hda/realtek: Enable mute/micmute LEDs and speaker support for HP Laptops Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 064/118] ata: ahci: Add Tiger Lake UP{3,4} AHCI controller Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 065/118] ata: libata-core: Disable READ LOG DMA EXT for Samsung MZ7LH Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 066/118] sched/psi: Fix use-after-free in ep_remove_wait_queue() Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 067/118] hugetlb: check for undefined shift on 32 bit architectures Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 068/118] nilfs2: fix underflow in second superblock position calculations Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 069/118] mm/MADV_COLLAPSE: set EAGAIN on unexpected page refcount Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 070/118] mm/filemap: fix page end in filemap_get_read_batch Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 071/118] mm/migrate: fix wrongly apply write bit after mkdirty on sparc64 Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 072/118] gpio: sim: fix a memory leak Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 073/118] freezer,umh: Fix call_usermode_helper_exec() vs SIGKILL Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 074/118] coredump: Move dump_emit_page() to kill unused warning Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 075/118] Revert "mm: Always release pages to the buddy allocator in memblock_free_late()." Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 076/118] net: Fix unwanted sign extension in netdev_stats_to_stats64() Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 077/118] revert "squashfs: harden sanity check in squashfs_read_xattr_id_table" Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 078/118] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking Greg Kroah-Hartman
2023-02-20 13:36 ` Greg Kroah-Hartman [this message]
2023-02-20 13:36 ` [PATCH 6.1 080/118] drm/i915/gen11: Wa_1408615072/Wa_1407596294 should be on GT list Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 081/118] ice: fix lost multicast packets in promisc mode Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 082/118] ixgbe: allow to increase MTU to 3K with XDP enabled Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 083/118] i40e: add double of VLAN header when computing the max MTU Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 084/118] net: bgmac: fix BCM5358 support by setting correct flags Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 085/118] net: ethernet: ti: am65-cpsw: Add RX DMA Channel Teardown Quirk Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 086/118] sctp: sctp_sock_filter(): avoid list_entry() on possibly empty list Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 087/118] net/sched: tcindex: update imperfect hash filters respecting rcu Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 088/118] ice: xsk: Fix cleaning of XDP_TX frames Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 089/118] dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 090/118] net/usb: kalmia: Dont pass act_len in usb_bulk_msg error path Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 091/118] net/sched: act_ctinfo: use percpu stats Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 092/118] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set() Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 093/118] net: stmmac: fix order of dwmac5 FlexPPS parametrization sequence Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 094/118] bnxt_en: Fix mqprio and XDP ring checking logic Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 095/118] tracing: Make trace_define_field_ext() static Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 096/118] net: stmmac: Restrict warning on disabling DMA store and fwd mode Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 097/118] net: use a bounce buffer for copying skb->mark Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 098/118] tipc: fix kernel warning when sending SYN message Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 099/118] net: mpls: fix stale pointer if allocation fails during device rename Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 100/118] igb: conditionalize I2C bit banging on external thermal sensor support Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 101/118] igb: Fix PPS input and output using 3rd and 4th SDP Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 102/118] ixgbe: add double of VLAN header when computing the max MTU Greg Kroah-Hartman
2023-02-20 13:36 ` [PATCH 6.1 103/118] ipv6: Fix datagram socket connection with DSCP Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 104/118] ipv6: Fix tcp " Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 105/118] mm/gup: add folio to list when folio_isolate_lru() succeed Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 106/118] mm: extend max struct page size for kmsan Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 107/118] i40e: Add checking for null for nlmsg_find_attr() Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 108/118] net/sched: tcindex: search key must be 16 bits Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 109/118] nvme-tcp: stop auth work after tearing down queues in error recovery Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 110/118] nvme-rdma: " Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 111/118] nvme-apple: fix controller shutdown in apple_nvme_disable Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 112/118] KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs) Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 113/118] kvm: initialize all of the kvm_debugregs structure before sending it to userspace Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 114/118] perf/x86: Refuse to export capabilities for hybrid PMUs Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 115/118] alarmtimer: Prevent starvation by small intervals and SIG_IGN Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 116/118] nvme-pci: refresh visible attrs for cmb attributes Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 117/118] ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak Greg Kroah-Hartman
2023-02-20 13:37 ` [PATCH 6.1 118/118] net: sched: sch: Fix off by one in htb_activate_prios() Greg Kroah-Hartman
2023-02-20 19:48 ` [PATCH 6.1 000/118] 6.1.13-rc1 review Conor Dooley
2023-02-21  3:16 ` Ron Economos
2023-02-21  5:46 ` Naresh Kamboju
2023-02-21  9:11 ` Bagas Sanjaya
2023-02-21 14:55 ` Sudip Mukherjee (Codethink)
2023-02-21 16:22 ` Guenter Roeck
2023-02-21 20:29 ` Florian Fainelli
2023-02-21 23:46 ` Shuah Khan
2023-02-22  2:36 ` Justin Forbes
2023-02-24 19:03 ` Allen Pais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230220133603.574607411@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=maxime@cerno.tech \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).