mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
drm/i915: Split the BDW/HSW specific shared pll selection
We'll need a different algorithm to select the shared DPLL. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
bf9584bd0e
commit
0220ab6e00
@ -708,23 +708,10 @@ intel_ddi_calculate_wrpll(int clock /* in Hz */,
|
|||||||
*r2_out = best.r2;
|
*r2_out = best.r2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static bool
|
||||||
* Tries to find a *shared* PLL for the CRTC and store it in
|
hsw_ddi_pll_select(struct intel_crtc *intel_crtc, int output, int clock)
|
||||||
* intel_crtc->ddi_pll_sel.
|
|
||||||
*
|
|
||||||
* For private DPLLs, compute_config() should do the selection for us. This
|
|
||||||
* function should be folded into compute_config() eventually.
|
|
||||||
*/
|
|
||||||
bool intel_ddi_pll_select(struct intel_crtc *intel_crtc)
|
|
||||||
{
|
{
|
||||||
struct drm_crtc *crtc = &intel_crtc->base;
|
if (output == INTEL_OUTPUT_HDMI) {
|
||||||
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
|
|
||||||
int type = intel_encoder->type;
|
|
||||||
int clock = intel_crtc->config.port_clock;
|
|
||||||
|
|
||||||
intel_put_shared_dpll(intel_crtc);
|
|
||||||
|
|
||||||
if (type == INTEL_OUTPUT_HDMI) {
|
|
||||||
struct intel_shared_dpll *pll;
|
struct intel_shared_dpll *pll;
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
unsigned p, n2, r2;
|
unsigned p, n2, r2;
|
||||||
@ -750,6 +737,26 @@ bool intel_ddi_pll_select(struct intel_crtc *intel_crtc)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tries to find a *shared* PLL for the CRTC and store it in
|
||||||
|
* intel_crtc->ddi_pll_sel.
|
||||||
|
*
|
||||||
|
* For private DPLLs, compute_config() should do the selection for us. This
|
||||||
|
* function should be folded into compute_config() eventually.
|
||||||
|
*/
|
||||||
|
bool intel_ddi_pll_select(struct intel_crtc *intel_crtc)
|
||||||
|
{
|
||||||
|
struct drm_crtc *crtc = &intel_crtc->base;
|
||||||
|
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
|
||||||
|
int type = intel_encoder->type;
|
||||||
|
int clock = intel_crtc->config.port_clock;
|
||||||
|
|
||||||
|
intel_put_shared_dpll(intel_crtc);
|
||||||
|
|
||||||
|
return hsw_ddi_pll_select(intel_crtc, type, clock);
|
||||||
|
}
|
||||||
|
|
||||||
void intel_ddi_set_pipe_settings(struct drm_crtc *crtc)
|
void intel_ddi_set_pipe_settings(struct drm_crtc *crtc)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = crtc->dev->dev_private;
|
struct drm_i915_private *dev_priv = crtc->dev->dev_private;
|
||||||
|
Loading…
Reference in New Issue
Block a user