forked from Minki/linux
drm/i915: abstraction for iosf to compile on all archs
The asm/iosf_mbi.h header is x86-only. Let's make IOSF_MBI kconfig selection conditional to x86 and provide a header with stubs for other architectures. This helps getting i915 available for other architectures in future. Signed-off-by: Mullati, Siva <siva.mullati@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211022192756.1228354-1-siva.mullati@intel.com
This commit is contained in:
parent
fed98c16f1
commit
f0e204e0d3
@ -21,7 +21,7 @@ config DRM_I915
|
||||
select ACPI_VIDEO if ACPI
|
||||
select ACPI_BUTTON if ACPI
|
||||
select SYNC_FILE
|
||||
select IOSF_MBI
|
||||
select IOSF_MBI if X86
|
||||
select CRC32
|
||||
select SND_HDA_I915 if SND_HDA_CORE
|
||||
select CEC_CORE if CEC_NOTIFIER
|
||||
|
42
drivers/gpu/drm/i915/i915_iosf_mbi.h
Normal file
42
drivers/gpu/drm/i915/i915_iosf_mbi.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright © 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __I915_IOSF_MBI_H__
|
||||
#define __I915_IOSF_MBI_H__
|
||||
|
||||
#if IS_ENABLED(CONFIG_IOSF_MBI)
|
||||
#include <asm/iosf_mbi.h>
|
||||
#else
|
||||
|
||||
/* Stubs to compile for all non-x86 archs */
|
||||
#define MBI_PMIC_BUS_ACCESS_BEGIN 1
|
||||
#define MBI_PMIC_BUS_ACCESS_END 2
|
||||
|
||||
struct notifier_block;
|
||||
|
||||
static inline void iosf_mbi_punit_acquire(void) {}
|
||||
static inline void iosf_mbi_punit_release(void) {}
|
||||
static inline void iosf_mbi_assert_punit_acquired(void) {}
|
||||
|
||||
static inline
|
||||
int iosf_mbi_register_pmic_bus_access_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
int iosf_mbi_unregister_pmic_bus_access_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __I915_IOSF_MBI_H__ */
|
@ -22,11 +22,11 @@
|
||||
*/
|
||||
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <asm/iosf_mbi.h>
|
||||
|
||||
#include "gt/intel_lrc_reg.h" /* for shadow reg list */
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_iosf_mbi.h"
|
||||
#include "i915_trace.h"
|
||||
#include "i915_vgpu.h"
|
||||
#include "intel_pm.h"
|
||||
|
@ -3,9 +3,8 @@
|
||||
* Copyright © 2013-2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <asm/iosf_mbi.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_iosf_mbi.h"
|
||||
#include "vlv_sideband.h"
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user