mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/i915/cmtg: Add intel_cmtg_is_allowed() for CMTG
CMTG is supported on transcoder A and transcoder B with EDP, so add a separate helper intel_cmtg_is_allowed() to check the prerequisites for enabling CMTG. CMTG will be enabled only in specific use cases such as PSR2, PR-ALPM, and LOBF, and will be used in conjunction with the DC3CO feature. DC3co will be enabled in a separate patch. Note: Use-case-specific checks and transcoder-port compatibility validation will be handled part of DC3co feature implementation. v2: - Remove separate flag for DC3co from crtc_state. [Uma, Dibin] v3: - Do not access power domain members directly. [Jani] v4: - Remove check for DC3co state now. if needed add Dc3co allow check later once Dc3co patches are merged. [Uma] Bspec: 68915 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-2-animesh.manna@intel.com
This commit is contained in:
parent
5c1e931312
commit
21ebf55d69
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/string_choices.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
|
@ -16,6 +15,7 @@
|
|||
#include "intel_display_device.h"
|
||||
#include "intel_display_power.h"
|
||||
#include "intel_display_regs.h"
|
||||
#include "intel_display_types.h"
|
||||
|
||||
/**
|
||||
* DOC: Common Primary Timing Generator (CMTG)
|
||||
|
|
@ -185,3 +185,15 @@ void intel_cmtg_sanitize(struct intel_display *display)
|
|||
|
||||
intel_cmtg_disable(display, &cmtg_config);
|
||||
}
|
||||
|
||||
bool intel_cmtg_is_allowed(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
|
||||
|
||||
if ((cpu_transcoder == TRANSCODER_A || cpu_transcoder == TRANSCODER_B) &&
|
||||
DISPLAY_VER(display) == 35 && intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,12 @@
|
|||
#ifndef __INTEL_CMTG_H__
|
||||
#define __INTEL_CMTG_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct intel_display;
|
||||
struct intel_crtc_state;
|
||||
|
||||
void intel_cmtg_sanitize(struct intel_display *display);
|
||||
bool intel_cmtg_is_allowed(const struct intel_crtc_state *crtc_state);
|
||||
|
||||
#endif /* __INTEL_CMTG_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user