mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 20:42:33 -04:00
drm/amd/display: Load DMCU IRAM
DMCU IRAM must be loaded by the driver before DMCU can function. Move the IRAM code out of the shadows and into a new file modules/power/power_helpers.c The IRAM table contains the backlight curve and ABM parameters Add this new file to the Makefiles Call dmcu_load_iram in late init of DM Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis <David.Francis@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
51f1f6f517
commit
bbf854dc35
47
drivers/gpu/drm/amd/display/modules/power/power_helpers.h
Normal file
47
drivers/gpu/drm/amd/display/modules/power/power_helpers.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2018 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors: AMD
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MODULES_POWER_POWER_HELPERS_H_
|
||||
#define MODULES_POWER_POWER_HELPERS_H_
|
||||
|
||||
#include "dc/inc/hw/dmcu.h"
|
||||
|
||||
|
||||
enum abm_defines {
|
||||
abm_defines_max_level = 4,
|
||||
abm_defines_max_config = 4,
|
||||
};
|
||||
|
||||
struct dmcu_iram_parameters {
|
||||
unsigned int *backlight_lut_array;
|
||||
unsigned int backlight_lut_array_size;
|
||||
unsigned int backlight_ramping_reduction;
|
||||
unsigned int backlight_ramping_start;
|
||||
unsigned int set;
|
||||
};
|
||||
|
||||
bool dmcu_load_iram(struct dmcu *dmcu,
|
||||
struct dmcu_iram_parameters params);
|
||||
|
||||
#endif /* MODULES_POWER_POWER_HELPERS_H_ */
|
||||
Reference in New Issue
Block a user