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

2712 MOP/MOPlet fixes #5773

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/bcm2712.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

mop: mop@7c500000 {
compatible = "brcm,bcm2712-mop";
reg = <0x7c500000 0x20>;
reg = <0x7c500000 0x28>;
interrupt-parent = <&disp_intr>;
interrupts = <1>;
status = "disabled";
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/vc4/vc4_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ struct vc4_crtc_data {
struct vc4_txp_data {
struct vc4_crtc_data base;
enum vc4_encoder_type encoder_type;
unsigned int high_addr_ptr_reg;
unsigned int has_byte_enable:1;
unsigned int size_minus_one:1;
unsigned int supports_40bit_addresses:1;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vc4/vc4_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static void vc6_hvs_pv_muxing_commit(struct vc4_dev *vc4,
mux = 0;
break;

case VC4_ENCODER_TYPE_TXP0:
case VC4_ENCODER_TYPE_TXP1:
mux = 2;
break;

Expand Down
8 changes: 6 additions & 2 deletions drivers/gpu/drm/vc4/vc4_txp.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
/* Number of lines received and committed to memory. */
#define TXP_PROGRESS 0x10

#define TXP_DST_PTR_HIGH 0x1c
#define TXP_DST_PTR_HIGH_MOPLET 0x1c
#define TXP_DST_PTR_HIGH_MOP 0x24

#define TXP_READ(offset) \
({ \
Expand Down Expand Up @@ -338,10 +339,11 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,

gem = drm_fb_dma_get_gem_obj(fb, 0);
addr = gem->dma_addr + fb->offsets[0];

TXP_WRITE(TXP_DST_PTR, lower_32_bits(addr));

if (txp_data->supports_40bit_addresses)
TXP_WRITE(TXP_DST_PTR_HIGH, upper_32_bits(addr) & 0xff);
TXP_WRITE(txp_data->high_addr_ptr_reg, upper_32_bits(addr) & 0xff);

TXP_WRITE(TXP_DST_PITCH, fb->pitches[0]);

Expand Down Expand Up @@ -520,6 +522,7 @@ const struct vc4_txp_data bcm2712_mop_data = {
.hvs_output = 2,
},
.encoder_type = VC4_ENCODER_TYPE_TXP0,
.high_addr_ptr_reg = TXP_DST_PTR_HIGH_MOP,
.has_byte_enable = true,
.size_minus_one = true,
.supports_40bit_addresses = true,
Expand All @@ -533,6 +536,7 @@ const struct vc4_txp_data bcm2712_moplet_data = {
.hvs_output = 4,
},
.encoder_type = VC4_ENCODER_TYPE_TXP1,
.high_addr_ptr_reg = TXP_DST_PTR_HIGH_MOPLET,
.size_minus_one = true,
.supports_40bit_addresses = true,
};
Expand Down