mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 23:13:26 +00:00
acrn-config: refine parameters for media_pt function
some parameters for media_pt function are not needed any more, remove these redundant parameters. Tracked-On: #3853 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
292d1a15f9
commit
950e3aa224
@ -21,7 +21,7 @@ def pass_through_dev(sel, pt_dev, vmid, config):
|
|||||||
print("", file=config)
|
print("", file=config)
|
||||||
|
|
||||||
|
|
||||||
def ipu_pt(sel, cap_pt, vmid, config):
|
def ipu_pt(sel, vmid, config):
|
||||||
|
|
||||||
if not sel.bdf['ipu'][vmid] and not sel.bdf['ipu_i2c'][vmid]:
|
if not sel.bdf['ipu'][vmid] and not sel.bdf['ipu_i2c'][vmid]:
|
||||||
return
|
return
|
||||||
@ -40,7 +40,6 @@ def ipu_pt(sel, cap_pt, vmid, config):
|
|||||||
fun_i2c = bdf_ipu_i2c[6:7]
|
fun_i2c = bdf_ipu_i2c[6:7]
|
||||||
slot_ipu_i2c = sel.slot['ipu_i2c'][vmid]
|
slot_ipu_i2c = sel.slot['ipu_i2c'][vmid]
|
||||||
|
|
||||||
if "ipu" in cap_pt or "ipu_i2c" in cap_pt:
|
|
||||||
if bdf_ipu or bdf_ipu_i2c:
|
if bdf_ipu or bdf_ipu_i2c:
|
||||||
print("ipu_passthrough=0", file=config)
|
print("ipu_passthrough=0", file=config)
|
||||||
print("", file=config)
|
print("", file=config)
|
||||||
@ -81,7 +80,7 @@ def ipu_pt(sel, cap_pt, vmid, config):
|
|||||||
print("", file=config)
|
print("", file=config)
|
||||||
|
|
||||||
|
|
||||||
def cse_pt(sel, cap_pt, vmid, config):
|
def cse_pt(sel, vmid, config):
|
||||||
|
|
||||||
if not sel.bdf['cse'][vmid]:
|
if not sel.bdf['cse'][vmid]:
|
||||||
return
|
return
|
||||||
@ -93,7 +92,6 @@ def cse_pt(sel, cap_pt, vmid, config):
|
|||||||
fun = bdf[6:7]
|
fun = bdf[6:7]
|
||||||
slot = sel.slot['cse'][vmid]
|
slot = sel.slot['cse'][vmid]
|
||||||
|
|
||||||
if "cse" in cap_pt:
|
|
||||||
if bdf:
|
if bdf:
|
||||||
print("cse_passthrough=0", file=config)
|
print("cse_passthrough=0", file=config)
|
||||||
print("hbm_ver=`cat /sys/class/mei/mei0/hbm_ver`", file=config)
|
print("hbm_ver=`cat /sys/class/mei/mei0/hbm_ver`", file=config)
|
||||||
@ -117,7 +115,7 @@ def cse_pt(sel, cap_pt, vmid, config):
|
|||||||
print("", file=config)
|
print("", file=config)
|
||||||
|
|
||||||
|
|
||||||
def audio_pt(uos_type, sel, cap_pt, vmid, config):
|
def audio_pt(uos_type, sel, vmid, config):
|
||||||
|
|
||||||
if not sel.bdf['audio'][vmid] and not sel.bdf['audio_codec'][vmid]:
|
if not sel.bdf['audio'][vmid] and not sel.bdf['audio_codec'][vmid]:
|
||||||
return
|
return
|
||||||
@ -142,7 +140,6 @@ def audio_pt(uos_type, sel, cap_pt, vmid, config):
|
|||||||
print(' echo ${passthru_bdf["audio"]} > /sys/bus/pci/drivers/pci-stub/bind', file=config)
|
print(' echo ${passthru_bdf["audio"]} > /sys/bus/pci/drivers/pci-stub/bind', file=config)
|
||||||
return
|
return
|
||||||
|
|
||||||
if "audio" in cap_pt or "audio_codec" in cap_pt:
|
|
||||||
if bdf_audio:
|
if bdf_audio:
|
||||||
print("kernel_version=$(uname -r)", file=config)
|
print("kernel_version=$(uname -r)", file=config)
|
||||||
print('audio_module="/usr/lib/modules/$kernel_version/kernel/sound/soc/intel/boards/snd-soc-sst_bxt_sos_tdf8532.ko"', file=config)
|
print('audio_module="/usr/lib/modules/$kernel_version/kernel/sound/soc/intel/boards/snd-soc-sst_bxt_sos_tdf8532.ko"', file=config)
|
||||||
@ -187,10 +184,10 @@ def audio_pt(uos_type, sel, cap_pt, vmid, config):
|
|||||||
print("fi", file=config)
|
print("fi", file=config)
|
||||||
|
|
||||||
|
|
||||||
def media_pt(uos_type, sel, cap_pt, vmid, config):
|
def media_pt(uos_type, sel, vmid, config):
|
||||||
ipu_pt(sel, cap_pt, vmid, config)
|
ipu_pt(sel, vmid, config)
|
||||||
cse_pt(sel, cap_pt, vmid, config)
|
cse_pt(sel, vmid, config)
|
||||||
audio_pt(uos_type, sel, cap_pt, vmid, config)
|
audio_pt(uos_type, sel, vmid, config)
|
||||||
|
|
||||||
|
|
||||||
def gen_pt(names, sel, vmid, config):
|
def gen_pt(names, sel, vmid, config):
|
||||||
@ -210,7 +207,7 @@ def gen_pt(names, sel, vmid, config):
|
|||||||
pass_through_dev(sel, pt_dev, vmid, config)
|
pass_through_dev(sel, pt_dev, vmid, config)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
media_pt(uos_type, sel, cap_pt, vmid, config)
|
media_pt(uos_type, sel, vmid, config)
|
||||||
|
|
||||||
def gen_pt_head(names, sel, vmid, config):
|
def gen_pt_head(names, sel, vmid, config):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user