mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 06:07:22 +07:00
drm/i915: drop intel_encoder argument to load_detect_pipe functions
Since it's redundant - we can get the attached encoder in the functions themselves. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
24218aacac
commit
d2434ab7fb
@ -517,14 +517,12 @@ intel_crt_detect(struct drm_connector *connector, bool force)
|
|||||||
return connector->status;
|
return connector->status;
|
||||||
|
|
||||||
/* for pre-945g platforms use load detect */
|
/* for pre-945g platforms use load detect */
|
||||||
if (intel_get_load_detect_pipe(&crt->base, connector, NULL,
|
if (intel_get_load_detect_pipe(connector, NULL, &tmp)) {
|
||||||
&tmp)) {
|
|
||||||
if (intel_crt_detect_ddc(connector))
|
if (intel_crt_detect_ddc(connector))
|
||||||
status = connector_status_connected;
|
status = connector_status_connected;
|
||||||
else
|
else
|
||||||
status = intel_crt_load_detect(crt);
|
status = intel_crt_load_detect(crt);
|
||||||
intel_release_load_detect_pipe(&crt->base, connector,
|
intel_release_load_detect_pipe(connector, &tmp);
|
||||||
&tmp);
|
|
||||||
} else
|
} else
|
||||||
status = connector_status_unknown;
|
status = connector_status_unknown;
|
||||||
|
|
||||||
|
@ -5584,12 +5584,13 @@ mode_fits_in_fbdev(struct drm_device *dev,
|
|||||||
return fb;
|
return fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
|
bool intel_get_load_detect_pipe(struct drm_connector *connector,
|
||||||
struct drm_connector *connector,
|
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *mode,
|
||||||
struct intel_load_detect_pipe *old)
|
struct intel_load_detect_pipe *old)
|
||||||
{
|
{
|
||||||
struct intel_crtc *intel_crtc;
|
struct intel_crtc *intel_crtc;
|
||||||
|
struct intel_encoder *intel_encoder =
|
||||||
|
intel_attached_encoder(connector);
|
||||||
struct drm_crtc *possible_crtc;
|
struct drm_crtc *possible_crtc;
|
||||||
struct drm_encoder *encoder = &intel_encoder->base;
|
struct drm_encoder *encoder = &intel_encoder->base;
|
||||||
struct drm_crtc *crtc = NULL;
|
struct drm_crtc *crtc = NULL;
|
||||||
@ -5694,10 +5695,11 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
|
void intel_release_load_detect_pipe(struct drm_connector *connector,
|
||||||
struct drm_connector *connector,
|
|
||||||
struct intel_load_detect_pipe *old)
|
struct intel_load_detect_pipe *old)
|
||||||
{
|
{
|
||||||
|
struct intel_encoder *intel_encoder =
|
||||||
|
intel_attached_encoder(connector);
|
||||||
struct drm_encoder *encoder = &intel_encoder->base;
|
struct drm_encoder *encoder = &intel_encoder->base;
|
||||||
struct drm_device *dev = encoder->dev;
|
struct drm_device *dev = encoder->dev;
|
||||||
|
|
||||||
|
@ -433,12 +433,10 @@ struct intel_load_detect_pipe {
|
|||||||
bool load_detect_temp;
|
bool load_detect_temp;
|
||||||
int dpms_mode;
|
int dpms_mode;
|
||||||
};
|
};
|
||||||
extern bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
|
extern bool intel_get_load_detect_pipe(struct drm_connector *connector,
|
||||||
struct drm_connector *connector,
|
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *mode,
|
||||||
struct intel_load_detect_pipe *old);
|
struct intel_load_detect_pipe *old);
|
||||||
extern void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
|
extern void intel_release_load_detect_pipe(struct drm_connector *connector,
|
||||||
struct drm_connector *connector,
|
|
||||||
struct intel_load_detect_pipe *old);
|
struct intel_load_detect_pipe *old);
|
||||||
|
|
||||||
extern void intelfb_restore(void);
|
extern void intelfb_restore(void);
|
||||||
|
@ -1303,12 +1303,9 @@ intel_tv_detect(struct drm_connector *connector, bool force)
|
|||||||
if (force) {
|
if (force) {
|
||||||
struct intel_load_detect_pipe tmp;
|
struct intel_load_detect_pipe tmp;
|
||||||
|
|
||||||
if (intel_get_load_detect_pipe(&intel_tv->base, connector,
|
if (intel_get_load_detect_pipe(connector, &mode, &tmp)) {
|
||||||
&mode, &tmp)) {
|
|
||||||
type = intel_tv_detect_type(intel_tv, connector);
|
type = intel_tv_detect_type(intel_tv, connector);
|
||||||
intel_release_load_detect_pipe(&intel_tv->base,
|
intel_release_load_detect_pipe(connector, &tmp);
|
||||||
connector,
|
|
||||||
&tmp);
|
|
||||||
} else
|
} else
|
||||||
return connector_status_unknown;
|
return connector_status_unknown;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user