Skip to content

Commit

Permalink
Merge tag 'drm-intel-next-2022-11-18' of git://anongit.freedesktop.or…
Browse files Browse the repository at this point in the history
…g/drm/drm-intel into drm-next

GVT Changes:
- gvt-next stuff mostly with refactor for the new MDEV interface.

i915 Changes:
- PSR fixes and improvements (Jouni)
- DP DSC fixes (Vinod, Jouni)
- More general display cleanups (Jani)
- More display collor management cleanup targetting degamma (Ville)
- remove circ_buf.h includes (Jiri)
- wait power off delay at driver remove to optimize probe (Jani)
- More audio cleanup targeting the ELD precompute readout (Ville)
- Enable DC power states on all eDP ports (Imre)
- RPL-P stepping info (Matt Atwood)
- MTL enabling patches (RK)
- Removal of DG2 force_probe (Matt)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Y3f71obyEkImXoUF@intel.com
  • Loading branch information
Dave Airlie committed Nov 22, 2022
2 parents 242eb7b + d2eae8e commit 3d335a5
Show file tree
Hide file tree
Showing 122 changed files with 1,173 additions and 749 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ i915-y += \
display/intel_global_state.o \
display/intel_hdcp.o \
display/intel_hotplug.o \
display/intel_hti.o \
display/intel_lpe_audio.o \
display/intel_modeset_verify.o \
display/intel_modeset_setup.o \
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/g4x_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/string_helpers.h>

#include "g4x_dp.h"
#include "i915_reg.h"
#include "intel_audio.h"
#include "intel_backlight.h"
#include "intel_connector.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/g4x_dp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <linux/types.h>

#include "i915_reg.h"
#include "i915_reg_defs.h"

enum pipe;
enum port;
Expand Down
15 changes: 14 additions & 1 deletion drivers/gpu/drm/i915/display/g4x_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include "g4x_hdmi.h"
#include "i915_reg.h"
#include "intel_audio.h"
#include "intel_connector.h"
#include "intel_crtc.h"
Expand Down Expand Up @@ -78,6 +79,18 @@ static bool intel_hdmi_get_hw_state(struct intel_encoder *encoder,
return ret;
}

static int g4x_hdmi_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
struct drm_i915_private *i915 = to_i915(encoder->base.dev);

if (HAS_PCH_SPLIT(i915))
crtc_state->has_pch_encoder = true;

return intel_hdmi_compute_config(encoder, crtc_state, conn_state);
}

static void intel_hdmi_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{
Expand Down Expand Up @@ -543,7 +556,7 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
"HDMI %c", port_name(port));

intel_encoder->hotplug = intel_hdmi_hotplug;
intel_encoder->compute_config = intel_hdmi_compute_config;
intel_encoder->compute_config = g4x_hdmi_compute_config;
if (HAS_PCH_SPLIT(dev_priv)) {
intel_encoder->disable = pch_disable_hdmi;
intel_encoder->post_disable = pch_post_disable_hdmi;
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/display/i9xx_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
#include <drm/drm_blend.h>
#include <drm/drm_fourcc.h>

#include "i915_irq.h"
#include "i915_reg.h"
#include "i9xx_plane.h"
#include "intel_atomic.h"
#include "intel_atomic_plane.h"
#include "intel_de.h"
#include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_fbc.h"
#include "intel_sprite.h"
#include "i9xx_plane.h"

/* Primary plane formats for gen <= 3 */
static const u32 i8xx_primary_formats[] = {
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/icl_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_mipi_dsi.h>

#include "i915_reg.h"
#include "icl_dsi.h"
#include "icl_dsi_regs.h"
#include "intel_atomic.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/icl_dsi_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef __ICL_DSI_REGS_H__
#define __ICL_DSI_REGS_H__

#include "i915_reg_defs.h"
#include "intel_display_reg_defs.h"

/* Gen11 DSI */
#define _MMIO_DSI(tc, dsi0, dsi1) _MMIO_TRANS((tc) - TRANSCODER_DSI_0, \
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/display/intel_atomic_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ void intel_plane_update_noarm(struct intel_plane *plane,
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);

trace_intel_plane_update_noarm(&plane->base, crtc);
trace_intel_plane_update_noarm(plane, crtc);

if (plane->update_noarm)
plane->update_noarm(plane, crtc_state, plane_state);
Expand All @@ -769,7 +769,7 @@ void intel_plane_update_arm(struct intel_plane *plane,
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);

trace_intel_plane_update_arm(&plane->base, crtc);
trace_intel_plane_update_arm(plane, crtc);

if (crtc_state->do_async_flip && plane->async_flip)
plane->async_flip(plane, crtc_state, plane_state, true);
Expand All @@ -782,7 +782,7 @@ void intel_plane_disable_arm(struct intel_plane *plane,
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);

trace_intel_plane_disable_arm(&plane->base, crtc);
trace_intel_plane_disable_arm(plane, crtc);
plane->disable_arm(plane, crtc_state);
}

Expand Down
28 changes: 13 additions & 15 deletions drivers/gpu/drm/i915/display/intel_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@ void intel_audio_codec_enable(struct intel_encoder *encoder,

if (i915->display.funcs.audio)
i915->display.funcs.audio->audio_codec_enable(encoder,
crtc_state,
conn_state);
crtc_state,
conn_state);

mutex_lock(&i915->display.audio.mutex);
encoder->audio_connector = connector;
Expand All @@ -854,7 +854,7 @@ void intel_audio_codec_enable(struct intel_encoder *encoder,
if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))
pipe = -1;
acomp->base.audio_ops->pin_eld_notify(acomp->base.audio_ops->audio_ptr,
(int) port, (int) pipe);
(int)port, (int)pipe);
}

intel_lpe_audio_notify(i915, pipe, port, connector->eld,
Expand Down Expand Up @@ -891,8 +891,8 @@ void intel_audio_codec_disable(struct intel_encoder *encoder,

if (i915->display.funcs.audio)
i915->display.funcs.audio->audio_codec_disable(encoder,
old_crtc_state,
old_conn_state);
old_crtc_state,
old_conn_state);

mutex_lock(&i915->display.audio.mutex);
encoder->audio_connector = NULL;
Expand All @@ -905,7 +905,7 @@ void intel_audio_codec_disable(struct intel_encoder *encoder,
if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST))
pipe = -1;
acomp->base.audio_ops->pin_eld_notify(acomp->base.audio_ops->audio_ptr,
(int) port, (int) pipe);
(int)port, (int)pipe);
}

intel_lpe_audio_notify(i915, pipe, port, NULL, 0, false);
Expand Down Expand Up @@ -1129,10 +1129,10 @@ static int i915_audio_component_get_cdclk_freq(struct device *kdev)
static struct intel_encoder *get_saved_enc(struct drm_i915_private *i915,
int port, int pipe)
{
struct intel_encoder *encoder;

/* MST */
if (pipe >= 0) {
struct intel_encoder *encoder;

if (drm_WARN_ON(&i915->drm,
pipe >= ARRAY_SIZE(i915->display.audio.encoder_map)))
return NULL;
Expand All @@ -1143,7 +1143,7 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *i915,
* MST or not. So it will poll all the port & pipe
* combinations
*/
if (encoder != NULL && encoder->port == port &&
if (encoder && encoder->port == port &&
encoder->type == INTEL_OUTPUT_DP_MST)
return encoder;
}
Expand All @@ -1153,14 +1153,12 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *i915,
return NULL;

for_each_pipe(i915, pipe) {
encoder = i915->display.audio.encoder_map[pipe];
if (encoder == NULL)
continue;
struct intel_encoder *encoder;

if (encoder->type == INTEL_OUTPUT_DP_MST)
continue;
encoder = i915->display.audio.encoder_map[pipe];

if (port == encoder->port)
if (encoder && encoder->port == port &&
encoder->type != INTEL_OUTPUT_DP_MST)
return encoder;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/intel_audio_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef __INTEL_AUDIO_REGS_H__
#define __INTEL_AUDIO_REGS_H__

#include "i915_reg_defs.h"
#include "intel_display_reg_defs.h"

#define G4X_AUD_CNTL_ST _MMIO(0x620B4)
#define G4X_ELD_VALID REG_BIT(14)
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/intel_backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <acpi/video.h>

#include "i915_reg.h"
#include "intel_backlight.h"
#include "intel_backlight_regs.h"
#include "intel_connector.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/intel_backlight_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef __INTEL_BACKLIGHT_REGS_H__
#define __INTEL_BACKLIGHT_REGS_H__

#include "i915_reg_defs.h"
#include "intel_display_reg_defs.h"

#define _VLV_BLC_PWM_CTL2_A (DISPLAY_MMIO_BASE(dev_priv) + 0x61250)
#define _VLV_BLC_PWM_CTL2_B (DISPLAY_MMIO_BASE(dev_priv) + 0x61350)
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/display/intel_bw.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ static int tgl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel
return ret;
}

if (dram_info->type == INTEL_DRAM_LPDDR4 || dram_info->type == INTEL_DRAM_LPDDR5)
if (DISPLAY_VER(dev_priv) < 14 &&
(dram_info->type == INTEL_DRAM_LPDDR4 || dram_info->type == INTEL_DRAM_LPDDR5))
num_channels *= 2;

qi.deinterleave = qi.deinterleave ? : DIV_ROUND_UP(num_channels, is_y_tile ? 4 : 2);
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/display/intel_cdclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/time.h>

#include "hsw_ips.h"
#include "i915_reg.h"
#include "intel_atomic.h"
#include "intel_atomic_plane.h"
#include "intel_audio.h"
Expand Down Expand Up @@ -2755,7 +2756,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);

if (drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
if (intel_crtc_needs_modeset(crtc_state))
pipe = INVALID_PIPE;
}

Expand Down
Loading

0 comments on commit 3d335a5

Please sign in to comment.