Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Handle persistence in DM

[Why]
Remove dm_write_persistent_data and dm_read_persistent_data as
persistence should be handled in DM.

[How]
Remove functions. Move read/write calls into DM layer while maintaining
logic.

Signed-off-by: Jaehyun Chung <jaehyun.chung@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>

authored by

Jaehyun Chung and committed by
Alex Deucher
1810f441 9ca1f474

+7 -95
-25
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
··· 47 47 { 48 48 } 49 49 50 - bool dm_write_persistent_data(struct dc_context *ctx, 51 - const struct dc_sink *sink, 52 - const char *module_name, 53 - const char *key_name, 54 - void *params, 55 - unsigned int size, 56 - struct persistent_data_flag *flag) 57 - { 58 - /*TODO implement*/ 59 - return false; 60 - } 61 - 62 - bool dm_read_persistent_data(struct dc_context *ctx, 63 - const struct dc_sink *sink, 64 - const char *module_name, 65 - const char *key_name, 66 - void *params, 67 - unsigned int size, 68 - struct persistent_data_flag *flag) 69 - { 70 - /*TODO implement*/ 71 - return false; 72 - } 73 - 74 50 /**** power component interfaces ****/ 75 -
-69
drivers/gpu/drm/amd/display/dc/dm_services.h
··· 261 261 bool save_per_edid; 262 262 }; 263 263 264 - /* Call to write data in registry editor for persistent data storage. 265 - * 266 - * \inputs sink - identify edid/link for registry folder creation 267 - * module name - identify folders for registry 268 - * key name - identify keys within folders for registry 269 - * params - value to write in defined folder/key 270 - * size - size of the input params 271 - * flag - determine whether to save by link or edid 272 - * 273 - * \returns true - call is successful 274 - * false - call failed 275 - * 276 - * sink module key 277 - * ----------------------------------------------------------------------------- 278 - * NULL NULL NULL - failure 279 - * NULL NULL - - create key with param value 280 - * under base folder 281 - * NULL - NULL - create module folder under base folder 282 - * - NULL NULL - failure 283 - * NULL - - - create key under module folder 284 - * with no edid/link identification 285 - * - NULL - - create key with param value 286 - * under base folder 287 - * - - NULL - create module folder under base folder 288 - * - - - - create key under module folder 289 - * with edid/link identification 290 - */ 291 - bool dm_write_persistent_data(struct dc_context *ctx, 292 - const struct dc_sink *sink, 293 - const char *module_name, 294 - const char *key_name, 295 - void *params, 296 - unsigned int size, 297 - struct persistent_data_flag *flag); 298 - 299 - 300 - /* Call to read data in registry editor for persistent data storage. 301 - * 302 - * \inputs sink - identify edid/link for registry folder creation 303 - * module name - identify folders for registry 304 - * key name - identify keys within folders for registry 305 - * size - size of the output params 306 - * flag - determine whether it was save by link or edid 307 - * 308 - * \returns params - value read from defined folder/key 309 - * true - call is successful 310 - * false - call failed 311 - * 312 - * sink module key 313 - * ----------------------------------------------------------------------------- 314 - * NULL NULL NULL - failure 315 - * NULL NULL - - read key under base folder 316 - * NULL - NULL - failure 317 - * - NULL NULL - failure 318 - * NULL - - - read key under module folder 319 - * with no edid/link identification 320 - * - NULL - - read key under base folder 321 - * - - NULL - failure 322 - * - - - - read key under module folder 323 - * with edid/link identification 324 - */ 325 - bool dm_read_persistent_data(struct dc_context *ctx, 326 - const struct dc_sink *sink, 327 - const char *module_name, 328 - const char *key_name, 329 - void *params, 330 - unsigned int size, 331 - struct persistent_data_flag *flag); 332 - 333 264 bool dm_query_extended_brightness_caps 334 265 (struct dc_context *ctx, enum dm_acpi_display_type display, 335 266 struct dm_acpi_atif_backlight_caps *pCaps);
+7 -1
drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
··· 36 36 bool dummy; 37 37 }; 38 38 39 - struct mod_stats *mod_stats_create(struct dc *dc); 39 + struct mod_stats_init_params { 40 + unsigned int stats_enable; 41 + unsigned int stats_entries; 42 + }; 43 + 44 + struct mod_stats *mod_stats_create(struct dc *dc, 45 + struct mod_stats_init_params *init_params); 40 46 41 47 void mod_stats_destroy(struct mod_stats *mod_stats); 42 48