mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/{i915, xe}: move opregion/dram/bw init to intel_display_driver_probe_noirq()
The intel_opregion_setup(), intel_dram_detect(), and intel_bw_init_hw() calls should really be in display. Move them at the beginning of intel_display_driver_probe_noirq(). This is a completely non-functional change for xe. For i915, the init order changes slightly: - i915_pcode_init() will happen before intel_opregion_setup(). This should be of no consequence. - The intel_gvt_init() calls will happen before the mentioned functions. There's a lot going on in intel_gvt_init(), but it does not look like this should have dependencies on them either. Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/aa37d6443516ae660c2de53aba8ca42e6e6d1a5c.1781549229.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
2420e54078
commit
ff8c73b7bf
|
|
@ -43,6 +43,7 @@
|
|||
#include "intel_dp_tunnel.h"
|
||||
#include "intel_dpll.h"
|
||||
#include "intel_dpll_mgr.h"
|
||||
#include "intel_dram.h"
|
||||
#include "intel_encoder.h"
|
||||
#include "intel_fb.h"
|
||||
#include "intel_fbc.h"
|
||||
|
|
@ -203,11 +204,23 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
|
|||
{
|
||||
int ret;
|
||||
|
||||
intel_opregion_setup(display);
|
||||
|
||||
/*
|
||||
* Fill the dram structure to get the system dram info. This will be
|
||||
* used for memory latency calculation.
|
||||
*/
|
||||
ret = intel_dram_detect(display);
|
||||
if (ret)
|
||||
goto cleanup_opregion;
|
||||
|
||||
intel_bw_init_hw(display);
|
||||
|
||||
if (HAS_DISPLAY(display)) {
|
||||
ret = drm_vblank_init(display->drm,
|
||||
INTEL_NUM_PIPES(display));
|
||||
if (ret)
|
||||
return ret;
|
||||
goto cleanup_opregion;
|
||||
}
|
||||
|
||||
intel_bios_init(display);
|
||||
|
|
@ -306,6 +319,8 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
|
|||
intel_display_power_driver_remove(display);
|
||||
cleanup_bios:
|
||||
intel_bios_driver_remove(display);
|
||||
cleanup_opregion:
|
||||
intel_opregion_cleanup(display);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
#include <drm/intel/intel_pcode_regs.h>
|
||||
|
||||
#include "display/i9xx_display_sr.h"
|
||||
#include "display/intel_bw.h"
|
||||
#include "display/intel_cdclk.h"
|
||||
#include "display/intel_crtc.h"
|
||||
#include "display/intel_display_device.h"
|
||||
|
|
@ -60,7 +59,6 @@
|
|||
#include "display/intel_dmc.h"
|
||||
#include "display/intel_dp.h"
|
||||
#include "display/intel_dpt.h"
|
||||
#include "display/intel_dram.h"
|
||||
#include "display/intel_fbdev.h"
|
||||
#include "display/intel_gmbus.h"
|
||||
#include "display/intel_hotplug.h"
|
||||
|
|
@ -469,7 +467,6 @@ static int i915_pcode_init(struct drm_i915_private *i915)
|
|||
*/
|
||||
static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
struct intel_display *display = dev_priv->display;
|
||||
struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
|
||||
int ret;
|
||||
|
||||
|
|
@ -563,26 +560,13 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
|
|||
drm_dbg(&dev_priv->drm, "can't enable MSI");
|
||||
}
|
||||
|
||||
intel_opregion_setup(display);
|
||||
|
||||
ret = i915_pcode_init(dev_priv);
|
||||
if (ret)
|
||||
goto err_opregion;
|
||||
|
||||
/*
|
||||
* Fill the dram structure to get the system dram info. This will be
|
||||
* used for memory latency calculation.
|
||||
*/
|
||||
ret = intel_dram_detect(display);
|
||||
if (ret)
|
||||
goto err_opregion;
|
||||
|
||||
intel_bw_init_hw(display);
|
||||
goto err_msi;
|
||||
|
||||
return 0;
|
||||
|
||||
err_opregion:
|
||||
intel_opregion_cleanup(display);
|
||||
err_msi:
|
||||
pci_disable_msi(pdev);
|
||||
err_mem_regions:
|
||||
intel_memory_regions_driver_release(dev_priv);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "intel_acpi.h"
|
||||
#include "intel_audio.h"
|
||||
#include "intel_bw.h"
|
||||
#include "intel_display.h"
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_display_device.h"
|
||||
|
|
@ -29,7 +28,6 @@
|
|||
#include "intel_dmc.h"
|
||||
#include "intel_dmc_wl.h"
|
||||
#include "intel_dp.h"
|
||||
#include "intel_dram.h"
|
||||
#include "intel_fbdev.h"
|
||||
#include "intel_hdcp.h"
|
||||
#include "intel_hotplug.h"
|
||||
|
|
@ -133,22 +131,9 @@ int xe_display_init_early(struct xe_device *xe)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Early display init.. */
|
||||
intel_opregion_setup(display);
|
||||
|
||||
/*
|
||||
* Fill the dram structure to get the system dram info. This will be
|
||||
* used for memory latency calculation.
|
||||
*/
|
||||
err = intel_dram_detect(display);
|
||||
if (err)
|
||||
goto err_opregion;
|
||||
|
||||
intel_bw_init_hw(display);
|
||||
|
||||
err = intel_display_driver_probe_noirq(display);
|
||||
if (err)
|
||||
goto err_opregion;
|
||||
return err;
|
||||
|
||||
err = intel_display_driver_probe_nogem(display);
|
||||
if (err)
|
||||
|
|
@ -158,8 +143,7 @@ int xe_display_init_early(struct xe_device *xe)
|
|||
err_noirq:
|
||||
intel_display_driver_remove_noirq(display);
|
||||
intel_display_power_cleanup(display);
|
||||
err_opregion:
|
||||
intel_opregion_cleanup(display);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user