@@ -7247,10 +7247,9 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
7247
7247
/* Cursor Support Check */
7248
7248
mode_lib->ms.support.CursorSupport = true;
7249
7249
for (k = 0; k < mode_lib->ms.num_active_planes; k++) {
7250
- if (display_cfg->plane_descriptors[k].cursor.cursor_width > 0. 0) {
7251
- if (display_cfg->plane_descriptors[k].cursor.cursor_bpp == 64 && mode_lib->ip.cursor_64bpp_support == false) {
7250
+ if (display_cfg->plane_descriptors[k].cursor.num_cursors > 0) {
7251
+ if (display_cfg->plane_descriptors[k].cursor.cursor_bpp == 64 && mode_lib->ip.cursor_64bpp_support == false)
7252
7252
mode_lib->ms.support.CursorSupport = false;
7253
- }
7254
7253
}
7255
7254
}
7256
7255
@@ -8111,27 +8110,31 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
8111
8110
for (k = 0; k < mode_lib->ms.num_active_planes; ++k) {
8112
8111
double line_time_us = (double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.h_total / ((double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.pixel_clock_khz / 1000);
8113
8112
bool cursor_not_enough_urgent_latency_hiding = 0;
8114
- calculate_cursor_req_attributes(
8115
- display_cfg->plane_descriptors[k].cursor.cursor_width,
8116
- display_cfg->plane_descriptors[k].cursor.cursor_bpp,
8117
8113
8118
- // output
8119
- &s->cursor_lines_per_chunk[k],
8120
- &s->cursor_bytes_per_line[k],
8121
- &s->cursor_bytes_per_chunk[k],
8122
- &s->cursor_bytes[k]);
8123
-
8124
- calculate_cursor_urgent_burst_factor(
8125
- mode_lib->ip.cursor_buffer_size,
8126
- display_cfg->plane_descriptors[k].cursor.cursor_width,
8127
- s->cursor_bytes_per_chunk[k],
8128
- s->cursor_lines_per_chunk[k],
8129
- line_time_us,
8130
- mode_lib->ms.UrgLatency,
8114
+ if (display_cfg->plane_descriptors[k].cursor.num_cursors > 0) {
8115
+ calculate_cursor_req_attributes(
8116
+ display_cfg->plane_descriptors[k].cursor.cursor_width,
8117
+ display_cfg->plane_descriptors[k].cursor.cursor_bpp,
8118
+
8119
+ // output
8120
+ &s->cursor_lines_per_chunk[k],
8121
+ &s->cursor_bytes_per_line[k],
8122
+ &s->cursor_bytes_per_chunk[k],
8123
+ &s->cursor_bytes[k]);
8124
+
8125
+ calculate_cursor_urgent_burst_factor(
8126
+ mode_lib->ip.cursor_buffer_size,
8127
+ display_cfg->plane_descriptors[k].cursor.cursor_width,
8128
+ s->cursor_bytes_per_chunk[k],
8129
+ s->cursor_lines_per_chunk[k],
8130
+ line_time_us,
8131
+ mode_lib->ms.UrgLatency,
8132
+
8133
+ // output
8134
+ &mode_lib->ms.UrgentBurstFactorCursor[k],
8135
+ &cursor_not_enough_urgent_latency_hiding);
8136
+ }
8131
8137
8132
- // output
8133
- &mode_lib->ms.UrgentBurstFactorCursor[k],
8134
- &cursor_not_enough_urgent_latency_hiding);
8135
8138
mode_lib->ms.UrgentBurstFactorCursorPre[k] = mode_lib->ms.UrgentBurstFactorCursor[k];
8136
8139
8137
8140
#ifdef __DML_VBA_DEBUG__
@@ -10608,31 +10611,33 @@ static bool dml_core_mode_programming(struct dml2_core_calcs_mode_programming_ex
10608
10611
10609
10612
for (k = 0; k < s->num_active_planes; ++k) {
10610
10613
bool cursor_not_enough_urgent_latency_hiding = 0;
10611
- double line_time_us;
10614
+ double line_time_us = 0.0 ;
10612
10615
10613
- calculate_cursor_req_attributes(
10614
- display_cfg->plane_descriptors[k].cursor.cursor_width,
10615
- display_cfg->plane_descriptors[k].cursor.cursor_bpp,
10616
+ line_time_us = display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.h_total /
10617
+ ((double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.pixel_clock_khz / 1000);
10618
+ if (display_cfg->plane_descriptors[k].cursor.num_cursors > 0) {
10619
+ calculate_cursor_req_attributes(
10620
+ display_cfg->plane_descriptors[k].cursor.cursor_width,
10621
+ display_cfg->plane_descriptors[k].cursor.cursor_bpp,
10616
10622
10617
- // output
10618
- &s->cursor_lines_per_chunk[k],
10619
- &s->cursor_bytes_per_line[k],
10620
- &s->cursor_bytes_per_chunk[k],
10621
- &s->cursor_bytes[k]);
10622
-
10623
- line_time_us = display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.h_total / ((double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.pixel_clock_khz / 1000);
10624
-
10625
- calculate_cursor_urgent_burst_factor(
10626
- mode_lib->ip.cursor_buffer_size,
10627
- display_cfg->plane_descriptors[k].cursor.cursor_width,
10628
- s->cursor_bytes_per_chunk[k],
10629
- s->cursor_lines_per_chunk[k],
10630
- line_time_us,
10631
- mode_lib->mp.UrgentLatency,
10623
+ // output
10624
+ &s->cursor_lines_per_chunk[k],
10625
+ &s->cursor_bytes_per_line[k],
10626
+ &s->cursor_bytes_per_chunk[k],
10627
+ &s->cursor_bytes[k]);
10628
+
10629
+ calculate_cursor_urgent_burst_factor(
10630
+ mode_lib->ip.cursor_buffer_size,
10631
+ display_cfg->plane_descriptors[k].cursor.cursor_width,
10632
+ s->cursor_bytes_per_chunk[k],
10633
+ s->cursor_lines_per_chunk[k],
10634
+ line_time_us,
10635
+ mode_lib->mp.UrgentLatency,
10632
10636
10633
- // output
10634
- &mode_lib->mp.UrgentBurstFactorCursor[k],
10635
- &cursor_not_enough_urgent_latency_hiding);
10637
+ // output
10638
+ &mode_lib->mp.UrgentBurstFactorCursor[k],
10639
+ &cursor_not_enough_urgent_latency_hiding);
10640
+ }
10636
10641
mode_lib->mp.UrgentBurstFactorCursorPre[k] = mode_lib->mp.UrgentBurstFactorCursor[k];
10637
10642
10638
10643
CalculateUrgentBurstFactor(
0 commit comments