Skip to content

Commit d298e6a

Browse files
Wen Hedliviu
authored andcommitted
drm/arm/mali-dp: Add display QoS interface configuration for Mali DP500
Configure the display Quality of service (QoS) levels priority if the optional property node "arm,malidp-aqros-value" is defined in DTS file. QoS signaling using AQROS and AWQOS AXI interface signals, the AQROS is driven from the "RQOS" register, so needed to program the RQOS register to avoid the high resolutions flicker issue on the LS1028A platform. Signed-off-by: Wen He <[email protected]> Signed-off-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 354c2d3 commit d298e6a

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

drivers/gpu/drm/arm/malidp_drv.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,12 @@ static int malidp_bind(struct device *dev)
817817

818818
malidp->core_id = version;
819819

820+
ret = of_property_read_u32(dev->of_node,
821+
"arm,malidp-arqos-value",
822+
&hwdev->arqos_value);
823+
if (ret)
824+
hwdev->arqos_value = 0x0;
825+
820826
/* set the number of lines used for output of RGB data */
821827
ret = of_property_read_u8_array(dev->of_node,
822828
"arm,malidp-output-port-lines",

drivers/gpu/drm/arm/malidp_hw.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,15 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode *
379379
malidp_hw_setbits(hwdev, MALIDP_DISP_FUNC_ILACED, MALIDP_DE_DISPLAY_FUNC);
380380
else
381381
malidp_hw_clearbits(hwdev, MALIDP_DISP_FUNC_ILACED, MALIDP_DE_DISPLAY_FUNC);
382+
383+
/*
384+
* Program the RQoS register to avoid high resolutions flicker
385+
* issue on the LS1028A.
386+
*/
387+
if (hwdev->arqos_value) {
388+
val = hwdev->arqos_value;
389+
malidp_hw_setbits(hwdev, val, MALIDP500_RQOS_QUALITY);
390+
}
382391
}
383392

384393
int malidp_format_get_bpp(u32 fmt)

drivers/gpu/drm/arm/malidp_hw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ struct malidp_hw_device {
251251

252252
/* size of memory used for rotating layers, up to two banks available */
253253
u32 rotation_memory[2];
254+
255+
/* priority level of RQOS register used for driven the ARQOS signal */
256+
u32 arqos_value;
254257
};
255258

256259
static inline u32 malidp_hw_read(struct malidp_hw_device *hwdev, u32 reg)

drivers/gpu/drm/arm/malidp_regs.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@
210210
#define MALIDP500_CONFIG_VALID 0x00f00
211211
#define MALIDP500_CONFIG_ID 0x00fd4
212212

213+
/*
214+
* The quality of service (QoS) register on the DP500. RQOS register values
215+
* are driven by the ARQOS signal, using AXI transacations, dependent on the
216+
* FIFO input level.
217+
* The RQOS register can also set QoS levels for:
218+
* - RED_ARQOS @ A 4-bit signal value for close to underflow conditions
219+
* - GREEN_ARQOS @ A 4-bit signal value for normal conditions
220+
*/
221+
#define MALIDP500_RQOS_QUALITY 0x00500
222+
213223
/* register offsets and bits specific to DP550/DP650 */
214224
#define MALIDP550_ADDR_SPACE_SIZE 0x10000
215225
#define MALIDP550_DE_CONTROL 0x00010

0 commit comments

Comments
 (0)