Lines Matching defs:softstate

92 is_64bit_aper(agp_target_softstate_t *softstate)
94 return (softstate->tsoft_devid == AMD_BR_8151);
101 is_intel_br(agp_target_softstate_t *softstate)
103 return ((softstate->tsoft_devid & VENDOR_ID_MASK) ==
167 * softstate driver soft state pointer
177 agp_target_get_apbase(agp_target_softstate_t *softstate)
181 if (is_intel_br(softstate)) {
182 aper_base = pci_config_get32(softstate->tsoft_pcihdl,
184 } else if (is_64bit_aper(softstate)) {
185 aper_base = pci_config_get64(softstate->tsoft_pcihdl,
204 * softstate driver soft state pointer
211 agp_target_get_apsize(agp_target_softstate_t *softstate)
217 ASSERT(softstate->tsoft_acaptr);
218 cap = softstate->tsoft_acaptr;
220 if (is_intel_br(softstate)) {
222 value = (uint16_t)pci_config_get8(softstate->tsoft_pcihdl,
224 } else if (is_64bit_aper(softstate)) {
225 value = pci_config_get16(softstate->tsoft_pcihdl,
279 if (ddi_dev_regsize(softstate->tsoft_dip,
296 agp_target_set_gartaddr(agp_target_softstate_t *softstate, uint32_t gartaddr)
298 ASSERT(softstate->tsoft_acaptr);
301 pci_config_put16(softstate->tsoft_pcihdl,
302 softstate->tsoft_acaptr + AGP_CONF_CONTROL, 0x0000);
304 pci_config_put32(softstate->tsoft_pcihdl,
305 softstate->tsoft_acaptr + AGP_CONF_ATTBASE,
422 i8xx_biosmem_detect(agp_target_softstate_t *softstate)
429 gms_off = softstate->tsoft_gms_off;
432 memval = pci_config_get8(softstate->tsoft_pcihdl,
489 intel_br_resume(agp_target_softstate_t *softstate)
493 gms_off = softstate->tsoft_gms_off;
498 pci_config_put16(softstate->tsoft_pcihdl,
499 gms_modes[gms_off].gm_regoff, softstate->tsoft_gms);
504 intel_br_suspend(agp_target_softstate_t *softstate)
508 gms_off = softstate->tsoft_gms_off;
509 softstate->tsoft_gms = pci_config_get16(softstate->tsoft_pcihdl,
518 agp_target_softstate_t *softstate;
528 softstate =
530 return (intel_br_resume(softstate));
544 softstate = ddi_get_soft_state(agptarget_glob_soft_handle, instance);
545 mutex_init(&softstate->tsoft_lock, NULL, MUTEX_DRIVER, NULL);
546 softstate->tsoft_dip = dip;
547 status = pci_config_setup(dip, &softstate->tsoft_pcihdl);
556 softstate->tsoft_devid = pci_config_get32(softstate->tsoft_pcihdl,
558 softstate->tsoft_gms_off = get_chip_gms(softstate->tsoft_devid);
559 if (softstate->tsoft_gms_off < 0) {
562 pci_config_teardown(&softstate->tsoft_pcihdl);
567 softstate->tsoft_acaptr = agp_target_cap_find(softstate->tsoft_pcihdl);
568 if (softstate->tsoft_acaptr == 0) {
570 if (is_intel_br(softstate))
571 softstate->tsoft_acaptr = AGP_CAP_OFF_DEF;
575 pci_config_teardown(&softstate->tsoft_pcihdl);
588 pci_config_teardown(&softstate->tsoft_pcihdl);
601 agp_target_softstate_t *softstate;
604 softstate = ddi_get_soft_state(agptarget_glob_soft_handle, instance);
608 return (intel_br_suspend(softstate));
618 pci_config_teardown(&softstate->tsoft_pcihdl);
619 mutex_destroy(&softstate->tsoft_lock);