Commit 1810f441 authored by Jaehyun Chung's avatar Jaehyun Chung Committed by Alex Deucher
Browse files

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: default avatarJaehyun Chung <jaehyun.chung@amd.com>
Reviewed-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9ca1f474
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -47,29 +47,4 @@ void dm_perf_trace_timestamp(const char *func_name, unsigned int line)
{
}

bool dm_write_persistent_data(struct dc_context *ctx,
		const struct dc_sink *sink,
		const char *module_name,
		const char *key_name,
		void *params,
		unsigned int size,
		struct persistent_data_flag *flag)
{
	/*TODO implement*/
	return false;
}

bool dm_read_persistent_data(struct dc_context *ctx,
				const struct dc_sink *sink,
				const char *module_name,
				const char *key_name,
				void *params,
				unsigned int size,
				struct persistent_data_flag *flag)
{
	/*TODO implement*/
	return false;
}

/**** power component interfaces ****/
+0 −69
Original line number Diff line number Diff line
@@ -261,75 +261,6 @@ struct persistent_data_flag {
	bool save_per_edid;
};

/* Call to write data in registry editor for persistent data storage.
 *
 * \inputs      sink - identify edid/link for registry folder creation
 *              module name - identify folders for registry
 *              key name - identify keys within folders for registry
 *              params - value to write in defined folder/key
 *              size - size of the input params
 *              flag - determine whether to save by link or edid
 *
 * \returns     true - call is successful
 *              false - call failed
 *
 * sink         module         key
 * -----------------------------------------------------------------------------
 * NULL         NULL           NULL     - failure
 * NULL         NULL           -        - create key with param value
 *                                                      under base folder
 * NULL         -              NULL     - create module folder under base folder
 * -            NULL           NULL     - failure
 * NULL         -              -        - create key under module folder
 *                                            with no edid/link identification
 * -            NULL           -        - create key with param value
 *                                                       under base folder
 * -            -              NULL     - create module folder under base folder
 * -            -              -        - create key under module folder
 *                                              with edid/link identification
 */
bool dm_write_persistent_data(struct dc_context *ctx,
		const struct dc_sink *sink,
		const char *module_name,
		const char *key_name,
		void *params,
		unsigned int size,
		struct persistent_data_flag *flag);


/* Call to read data in registry editor for persistent data storage.
 *
 * \inputs      sink - identify edid/link for registry folder creation
 *              module name - identify folders for registry
 *              key name - identify keys within folders for registry
 *              size - size of the output params
 *              flag - determine whether it was save by link or edid
 *
 * \returns     params - value read from defined folder/key
 *              true - call is successful
 *              false - call failed
 *
 * sink         module         key
 * -----------------------------------------------------------------------------
 * NULL         NULL           NULL     - failure
 * NULL         NULL           -        - read key under base folder
 * NULL         -              NULL     - failure
 * -            NULL           NULL     - failure
 * NULL         -              -        - read key under module folder
 *                                             with no edid/link identification
 * -            NULL           -        - read key under base folder
 * -            -              NULL     - failure
 * -            -              -        - read key under module folder
 *                                              with edid/link identification
 */
bool dm_read_persistent_data(struct dc_context *ctx,
		const struct dc_sink *sink,
		const char *module_name,
		const char *key_name,
		void *params,
		unsigned int size,
		struct persistent_data_flag *flag);

bool dm_query_extended_brightness_caps
	(struct dc_context *ctx, enum dm_acpi_display_type display,
			struct dm_acpi_atif_backlight_caps *pCaps);
+7 −1
Original line number Diff line number Diff line
@@ -36,7 +36,13 @@ struct mod_stats_caps {
	bool dummy;
};

struct mod_stats *mod_stats_create(struct dc *dc);
struct mod_stats_init_params {
	unsigned int stats_enable;
	unsigned int stats_entries;
};

struct mod_stats *mod_stats_create(struct dc *dc,
		struct mod_stats_init_params *init_params);

void mod_stats_destroy(struct mod_stats *mod_stats);