mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-29 03:24:53 -04:00
Currently, most callers of intel_panel_mode_valid() also call intel_panel_fixed_mode(). This is done either to check for the presence of a fixed mode for the connector or to get the clock of the fixed mode, which is then compared against the max dotclock for the pipe. Since intel_panel_mode_valid() already calls intel_panel_fixed_mode() internally, we can avoid yet another call to intel_panel_fixed_mode() from the caller. Remove the redundant call to intel_panel_fixed_mode() in mode_valid paths. To get the clock for the fixed mode, extend the helper intel_panel_mode_valid() to accept 'target_clock' as an out param. The 'target_clock' can then be used by the callers to check against the max dotclock. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260430131220.3891497-3-ankit.k.nautiyal@intel.com
62 lines
2.4 KiB
C
62 lines
2.4 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_PANEL_H__
|
|
#define __INTEL_PANEL_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
enum drm_connector_status;
|
|
enum drrs_type;
|
|
struct drm_connector;
|
|
struct drm_connector_state;
|
|
struct drm_display_mode;
|
|
struct drm_edid;
|
|
struct intel_connector;
|
|
struct intel_crtc_state;
|
|
struct intel_display;
|
|
struct intel_encoder;
|
|
|
|
void intel_panel_init_alloc(struct intel_connector *connector);
|
|
int intel_panel_init(struct intel_connector *connector,
|
|
const struct drm_edid *fixed_edid);
|
|
void intel_panel_fini(struct intel_connector *connector);
|
|
int intel_panel_register(struct intel_connector *connector);
|
|
void intel_panel_unregister(struct intel_connector *connector);
|
|
enum drm_connector_status
|
|
intel_panel_detect(struct drm_connector *connector, bool force);
|
|
bool intel_panel_use_ssc(struct intel_display *display);
|
|
const struct drm_display_mode *
|
|
intel_panel_preferred_fixed_mode(struct intel_connector *connector);
|
|
const struct drm_display_mode *
|
|
intel_panel_fixed_mode(struct intel_connector *connector,
|
|
const struct drm_display_mode *mode);
|
|
const struct drm_display_mode *
|
|
intel_panel_downclock_mode(struct intel_connector *connector,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
const struct drm_display_mode *
|
|
intel_panel_highest_mode(struct intel_connector *connector,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
int intel_panel_get_modes(struct intel_connector *connector);
|
|
enum drrs_type intel_panel_drrs_type(struct intel_connector *connector);
|
|
enum drm_mode_status
|
|
intel_panel_mode_valid(struct intel_connector *connector,
|
|
const struct drm_display_mode *mode,
|
|
int *target_clock);
|
|
int intel_panel_compute_config(struct intel_connector *connector,
|
|
struct drm_display_mode *adjusted_mode);
|
|
void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
|
|
bool use_alt_fixed_modes);
|
|
void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector);
|
|
void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector);
|
|
void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
|
|
struct intel_encoder *encoder);
|
|
|
|
void intel_panel_prepare(const struct intel_crtc_state *crtc_state,
|
|
const struct drm_connector_state *conn_state);
|
|
void intel_panel_unprepare(const struct drm_connector_state *old_conn_state);
|
|
|
|
#endif /* __INTEL_PANEL_H__ */
|