Message ID | 20241212143329.938202-3-nemesa.garg@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Consider joiner calculation for panel fitting | expand |
-----Original Message----- From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Nemesa Garg Sent: Thursday, December 12, 2024 6:33 AM To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org Cc: Garg, Nemesa <nemesa.garg@intel.com> Subject: [PATCH 2/2] drm/i915/display: Initialize pipe_src in compute stage > > Add early pipe src initialization for gmch and later > initialize the pipe src during compute_pipe_src. > > Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> LGTM. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> -Jonathan Cavitt > --- > drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 7be2ea11b8b0..50693b6ca58c 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -2534,6 +2534,13 @@ static int intel_crtc_compute_pipe_src(struct intel_crtc_state *crtc_state) > { > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); > struct drm_i915_private *i915 = to_i915(crtc->base.dev); > + int pipe_src_w, pipe_src_h; > + > + drm_mode_get_hv_timing(&crtc_state->hw.mode, > + &pipe_src_w, &pipe_src_h); > + > + drm_rect_init(&crtc_state->pipe_src, 0, 0, > + pipe_src_w, pipe_src_h); > > intel_joiner_compute_pipe_src(crtc_state); > > @@ -5016,10 +5023,12 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, > * computation to clearly distinguish it from the adjusted mode, which > * can be changed by the connectors in the below retry loop. > */ > - drm_mode_get_hv_timing(&crtc_state->hw.mode, > - &pipe_src_w, &pipe_src_h); > - drm_rect_init(&crtc_state->pipe_src, 0, 0, > - pipe_src_w, pipe_src_h); > + if (HAS_GMCH(i915)) { > + drm_mode_get_hv_timing(&crtc_state->hw.mode, > + &pipe_src_w, &pipe_src_h); > + drm_rect_init(&crtc_state->pipe_src, 0, 0, > + pipe_src_w, pipe_src_h); > + } > > for_each_new_connector_in_state(&state->base, connector, connector_state, i) { > struct intel_encoder *encoder = > -- > 2.25.1 > >
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 7be2ea11b8b0..50693b6ca58c 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2534,6 +2534,13 @@ static int intel_crtc_compute_pipe_src(struct intel_crtc_state *crtc_state) { struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct drm_i915_private *i915 = to_i915(crtc->base.dev); + int pipe_src_w, pipe_src_h; + + drm_mode_get_hv_timing(&crtc_state->hw.mode, + &pipe_src_w, &pipe_src_h); + + drm_rect_init(&crtc_state->pipe_src, 0, 0, + pipe_src_w, pipe_src_h); intel_joiner_compute_pipe_src(crtc_state); @@ -5016,10 +5023,12 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, * computation to clearly distinguish it from the adjusted mode, which * can be changed by the connectors in the below retry loop. */ - drm_mode_get_hv_timing(&crtc_state->hw.mode, - &pipe_src_w, &pipe_src_h); - drm_rect_init(&crtc_state->pipe_src, 0, 0, - pipe_src_w, pipe_src_h); + if (HAS_GMCH(i915)) { + drm_mode_get_hv_timing(&crtc_state->hw.mode, + &pipe_src_w, &pipe_src_h); + drm_rect_init(&crtc_state->pipe_src, 0, 0, + pipe_src_w, pipe_src_h); + } for_each_new_connector_in_state(&state->base, connector, connector_state, i) { struct intel_encoder *encoder =
Add early pipe src initialization for gmch and later initialize the pipe src during compute_pipe_src. Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)