mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
drm/i915/display: conversions to with_intel_display_rpm()
Convert all with_intel_runtime_pm() uses to with_intel_display_rpm(). Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/888566433ca5f31b3fa3c0a192fd495d86c2f201.1742483007.git.jani.nikula@intel.com
This commit is contained in:
parent
336c0eaed2
commit
e1de63b84c
4 changed files with 12 additions and 13 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "intel_backlight_regs.h"
|
||||
#include "intel_connector.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_dp_aux_backlight.h"
|
||||
#include "intel_dsi_dcs_backlight.h"
|
||||
|
|
@ -901,11 +902,9 @@ static int intel_backlight_device_get_brightness(struct backlight_device *bd)
|
|||
{
|
||||
struct intel_connector *connector = bl_get_data(bd);
|
||||
struct intel_display *display = to_intel_display(connector);
|
||||
struct drm_i915_private *i915 = to_i915(connector->base.dev);
|
||||
intel_wakeref_t wakeref;
|
||||
int ret = 0;
|
||||
|
||||
with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
|
||||
with_intel_display_rpm(display) {
|
||||
u32 hw_level;
|
||||
|
||||
drm_modeset_lock(&display->drm->mode_config.connection_mutex, NULL);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "i915_drv.h"
|
||||
#include "intel_display.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_gmbus.h"
|
||||
|
||||
|
|
@ -3115,7 +3116,6 @@ static const struct vbt_header *intel_bios_get_vbt(struct intel_display *display
|
|||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
const struct vbt_header *vbt = NULL;
|
||||
intel_wakeref_t wakeref;
|
||||
|
||||
vbt = firmware_get_vbt(display, sizep);
|
||||
|
||||
|
|
@ -3127,11 +3127,11 @@ static const struct vbt_header *intel_bios_get_vbt(struct intel_display *display
|
|||
* through MMIO or PCI mapping
|
||||
*/
|
||||
if (!vbt && IS_DGFX(i915))
|
||||
with_intel_runtime_pm(&i915->runtime_pm, wakeref)
|
||||
with_intel_display_rpm(display)
|
||||
vbt = oprom_get_vbt(display, intel_rom_spi(i915), sizep, "SPI flash");
|
||||
|
||||
if (!vbt)
|
||||
with_intel_runtime_pm(&i915->runtime_pm, wakeref)
|
||||
with_intel_display_rpm(display)
|
||||
vbt = oprom_get_vbt(display, intel_rom_pci(i915), sizep, "PCI ROM");
|
||||
|
||||
return vbt;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "intel_de.h"
|
||||
#include "intel_display_power.h"
|
||||
#include "intel_display_power_well.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_hdcp.h"
|
||||
#include "intel_hdcp_gsc.h"
|
||||
|
|
@ -334,9 +335,7 @@ static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *dig_port,
|
|||
|
||||
static bool hdcp_key_loadable(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
enum i915_power_well_id id;
|
||||
intel_wakeref_t wakeref;
|
||||
bool enabled = false;
|
||||
|
||||
/*
|
||||
|
|
@ -349,7 +348,7 @@ static bool hdcp_key_loadable(struct intel_display *display)
|
|||
id = SKL_DISP_PW_1;
|
||||
|
||||
/* PG1 (power well #1) needs to be enabled */
|
||||
with_intel_runtime_pm(&i915->runtime_pm, wakeref)
|
||||
with_intel_display_rpm(display)
|
||||
enabled = intel_display_power_well_is_enabled(display, id);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "intel_de.h"
|
||||
#include "intel_display.h"
|
||||
#include "intel_display_power.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_fb.h"
|
||||
#include "intel_fixed.h"
|
||||
|
|
@ -4057,7 +4058,7 @@ static ssize_t skl_watermark_ipc_status_write(struct file *file,
|
|||
{
|
||||
struct seq_file *m = file->private_data;
|
||||
struct drm_i915_private *i915 = m->private;
|
||||
intel_wakeref_t wakeref;
|
||||
struct intel_display *display = &i915->display;
|
||||
bool enable;
|
||||
int ret;
|
||||
|
||||
|
|
@ -4065,11 +4066,11 @@ static ssize_t skl_watermark_ipc_status_write(struct file *file,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
|
||||
with_intel_display_rpm(display) {
|
||||
if (!skl_watermark_ipc_enabled(i915) && enable)
|
||||
drm_info(&i915->drm,
|
||||
drm_info(display->drm,
|
||||
"Enabling IPC: WM will be proper only after next commit\n");
|
||||
i915->display.wm.ipc_enabled = enable;
|
||||
display->wm.ipc_enabled = enable;
|
||||
skl_watermark_ipc_update(i915);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue