Skip to content

Commit a9ec3fe

Browse files
Camille Choalexdeucher
authored andcommitted
drm/amd/display: Add definition for number of backlight data points
[Why] A hardcoded number is used today [How] Add definition for number of BL data points Signed-off-by: Camille Cho <Camille.Cho@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 6026be6 commit a9ec3fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/display/dc/dm_services_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ struct dm_bl_data_point {
220220
};
221221

222222
/* Total size of the structure should not exceed 256 bytes */
223+
#define BL_DATA_POINTS 99
223224
struct dm_acpi_atif_backlight_caps {
224225
uint16_t size; /* Bytes 0-1 (2 bytes) */
225226
uint16_t flags; /* Byted 2-3 (2 bytes) */
@@ -229,7 +230,7 @@ struct dm_acpi_atif_backlight_caps {
229230
uint8_t min_input_signal; /* Byte 7 */
230231
uint8_t max_input_signal; /* Byte 8 */
231232
uint8_t num_data_points; /* Byte 9 */
232-
struct dm_bl_data_point data_points[99]; /* Bytes 10-207 (198 bytes)*/
233+
struct dm_bl_data_point data_points[BL_DATA_POINTS]; /* Bytes 10-207 (198 bytes)*/
233234
};
234235

235236
enum dm_acpi_display_type {

0 commit comments

Comments
 (0)