Lines Matching +full:out +full:- +full:functions

19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
53 u32 function_bits; /* supported functions bit vector */
68 u8 thermal_state; /* thermal state: state id (0: exit state, non-0: state) */
72 u8 backlight_level; /* panel backlight level (0-255) */
83 u32 function_bits; /* supported functions bit vector */
90 u16 client_id; /* client id (bit 2-0: func num, 7-3: dev num, 15-8: bus num) */
105 * radeon_atif_call - call an ATIF method
130 atif_arg_elements[1].buffer.length = params->length; in radeon_atif_call()
131 atif_arg_elements[1].buffer.pointer = params->pointer; in radeon_atif_call()
152 * radeon_atif_parse_notification - parse supported notifications
163 n->display_switch = mask & ATIF_DISPLAY_SWITCH_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
164 n->expansion_mode_change = mask & ATIF_EXPANSION_MODE_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
165 n->thermal_state = mask & ATIF_THERMAL_STATE_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
166 n->forced_power_state = mask & ATIF_FORCED_POWER_STATE_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
167 n->system_power_state = mask & ATIF_SYSTEM_POWER_SOURCE_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
168 n->display_conf_change = mask & ATIF_DISPLAY_CONF_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
169 n->px_gfx_switch = mask & ATIF_PX_GFX_SWITCH_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
170 n->brightness_change = mask & ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST_SUPPORTED; in radeon_atif_parse_notification()
171 n->dgpu_display_event = mask & ATIF_DGPU_DISPLAY_EVENT_SUPPORTED; in radeon_atif_parse_notification()
175 * radeon_atif_parse_functions - parse supported functions
177 * @f: supported functions struct
178 * @mask: supported functions mask from ATIF
180 * Use the supported functions mask from ATIF function
181 * ATIF_FUNCTION_VERIFY_INTERFACE to determine what functions
186 f->system_params = mask & ATIF_GET_SYSTEM_PARAMETERS_SUPPORTED; in radeon_atif_parse_functions()
187 f->sbios_requests = mask & ATIF_GET_SYSTEM_BIOS_REQUESTS_SUPPORTED; in radeon_atif_parse_functions()
188 f->select_active_disp = mask & ATIF_SELECT_ACTIVE_DISPLAYS_SUPPORTED; in radeon_atif_parse_functions()
189 f->lid_state = mask & ATIF_GET_LID_STATE_SUPPORTED; in radeon_atif_parse_functions()
190 f->get_tv_standard = mask & ATIF_GET_TV_STANDARD_FROM_CMOS_SUPPORTED; in radeon_atif_parse_functions()
191 f->set_tv_standard = mask & ATIF_SET_TV_STANDARD_IN_CMOS_SUPPORTED; in radeon_atif_parse_functions()
192 f->get_panel_expansion_mode = mask & ATIF_GET_PANEL_EXPANSION_MODE_FROM_CMOS_SUPPORTED; in radeon_atif_parse_functions()
193 f->set_panel_expansion_mode = mask & ATIF_SET_PANEL_EXPANSION_MODE_IN_CMOS_SUPPORTED; in radeon_atif_parse_functions()
194 f->temperature_change = mask & ATIF_TEMPERATURE_CHANGE_NOTIFICATION_SUPPORTED; in radeon_atif_parse_functions()
195 f->graphics_device_types = mask & ATIF_GET_GRAPHICS_DEVICE_TYPES_SUPPORTED; in radeon_atif_parse_functions()
199 * radeon_atif_verify_interface - verify ATIF
219 return -EIO; in radeon_atif_verify_interface()
223 size = *(u16 *) info->buffer.pointer; in radeon_atif_verify_interface()
226 err = -EINVAL; in radeon_atif_verify_interface()
227 goto out; in radeon_atif_verify_interface()
231 memcpy(&output, info->buffer.pointer, size); in radeon_atif_verify_interface()
236 radeon_atif_parse_notification(&atif->notifications, output.notification_mask); in radeon_atif_verify_interface()
237 radeon_atif_parse_functions(&atif->functions, output.function_bits); in radeon_atif_verify_interface()
239 out: in radeon_atif_verify_interface()
245 * radeon_atif_get_notification_params - determine notify configuration
266 err = -EIO; in radeon_atif_get_notification_params()
267 goto out; in radeon_atif_get_notification_params()
270 size = *(u16 *) info->buffer.pointer; in radeon_atif_get_notification_params()
272 err = -EINVAL; in radeon_atif_get_notification_params()
273 goto out; in radeon_atif_get_notification_params()
278 memcpy(&params, info->buffer.pointer, size); in radeon_atif_get_notification_params()
285 n->enabled = false; in radeon_atif_get_notification_params()
286 n->command_code = 0; in radeon_atif_get_notification_params()
288 n->enabled = true; in radeon_atif_get_notification_params()
289 n->command_code = 0x81; in radeon_atif_get_notification_params()
292 err = -EINVAL; in radeon_atif_get_notification_params()
293 goto out; in radeon_atif_get_notification_params()
295 n->enabled = true; in radeon_atif_get_notification_params()
296 n->command_code = params.command_code; in radeon_atif_get_notification_params()
299 out: in radeon_atif_get_notification_params()
301 (n->enabled ? "enabled" : "disabled"), in radeon_atif_get_notification_params()
302 n->command_code); in radeon_atif_get_notification_params()
308 * radeon_atif_get_sbios_requests - get requested sbios event
327 return -EIO; in radeon_atif_get_sbios_requests()
329 size = *(u16 *)info->buffer.pointer; in radeon_atif_get_sbios_requests()
331 count = -EINVAL; in radeon_atif_get_sbios_requests()
332 goto out; in radeon_atif_get_sbios_requests()
337 memcpy(req, info->buffer.pointer, size); in radeon_atif_get_sbios_requests()
338 DRM_DEBUG_DRIVER("SBIOS pending requests: %#x\n", req->pending); in radeon_atif_get_sbios_requests()
340 count = hweight32(req->pending); in radeon_atif_get_sbios_requests()
342 out: in radeon_atif_get_sbios_requests()
348 * radeon_atif_handler - handle ATIF notify requests
360 struct radeon_atif *atif = &rdev->atif; in radeon_atif_handler()
366 event->device_class, event->type); in radeon_atif_handler()
368 if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0) in radeon_atif_handler()
371 if (!atif->notification_cfg.enabled || in radeon_atif_handler()
372 event->type != atif->notification_cfg.command_code) in radeon_atif_handler()
377 handle = ACPI_HANDLE(&rdev->pdev->dev); in radeon_atif_handler()
386 struct radeon_encoder *enc = atif->encoder_for_bl; in radeon_atif_handler()
394 if (rdev->is_atom_bios) { in radeon_atif_handler()
395 struct radeon_encoder_atom_dig *dig = enc->enc_priv; in radeon_atif_handler()
396 backlight_force_update(dig->bl_dev, in radeon_atif_handler()
399 struct radeon_encoder_lvds *dig = enc->enc_priv; in radeon_atif_handler()
400 backlight_force_update(dig->bl_dev, in radeon_atif_handler()
406 if ((rdev->flags & RADEON_IS_PX) && in radeon_atif_handler()
408 pm_runtime_get_sync(rdev_to_drm(rdev)->dev); in radeon_atif_handler()
411 pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev); in radeon_atif_handler()
412 pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); in radeon_atif_handler()
428 * radeon_atcs_call - call an ATCS method
453 atcs_arg_elements[1].buffer.length = params->length; in radeon_atcs_call()
454 atcs_arg_elements[1].buffer.pointer = params->pointer; in radeon_atcs_call()
475 * radeon_atcs_parse_functions - parse supported functions
477 * @f: supported functions struct
478 * @mask: supported functions mask from ATCS
480 * Use the supported functions mask from ATCS function
481 * ATCS_FUNCTION_VERIFY_INTERFACE to determine what functions
486 f->get_ext_state = mask & ATCS_GET_EXTERNAL_STATE_SUPPORTED; in radeon_atcs_parse_functions()
487 f->pcie_perf_req = mask & ATCS_PCIE_PERFORMANCE_REQUEST_SUPPORTED; in radeon_atcs_parse_functions()
488 f->pcie_dev_rdy = mask & ATCS_PCIE_DEVICE_READY_NOTIFICATION_SUPPORTED; in radeon_atcs_parse_functions()
489 f->pcie_bus_width = mask & ATCS_SET_PCIE_BUS_WIDTH_SUPPORTED; in radeon_atcs_parse_functions()
493 * radeon_atcs_verify_interface - verify ATCS
513 return -EIO; in radeon_atcs_verify_interface()
517 size = *(u16 *) info->buffer.pointer; in radeon_atcs_verify_interface()
520 err = -EINVAL; in radeon_atcs_verify_interface()
521 goto out; in radeon_atcs_verify_interface()
525 memcpy(&output, info->buffer.pointer, size); in radeon_atcs_verify_interface()
530 radeon_atcs_parse_functions(&atcs->functions, output.function_bits); in radeon_atcs_verify_interface()
532 out: in radeon_atcs_verify_interface()
548 struct radeon_atcs *atcs = &rdev->atcs; in radeon_acpi_is_pcie_performance_request_supported()
550 if (atcs->functions.pcie_perf_req && atcs->functions.pcie_dev_rdy) in radeon_acpi_is_pcie_performance_request_supported()
569 struct radeon_atcs *atcs = &rdev->atcs; in radeon_acpi_pcie_notify_device_ready()
572 handle = ACPI_HANDLE(&rdev->pdev->dev); in radeon_acpi_pcie_notify_device_ready()
574 return -EINVAL; in radeon_acpi_pcie_notify_device_ready()
576 if (!atcs->functions.pcie_dev_rdy) in radeon_acpi_pcie_notify_device_ready()
577 return -EINVAL; in radeon_acpi_pcie_notify_device_ready()
581 return -EIO; in radeon_acpi_pcie_notify_device_ready()
604 struct radeon_atcs *atcs = &rdev->atcs; in radeon_acpi_pcie_performance_request()
612 handle = ACPI_HANDLE(&rdev->pdev->dev); in radeon_acpi_pcie_performance_request()
614 return -EINVAL; in radeon_acpi_pcie_performance_request()
616 if (!atcs->functions.pcie_perf_req) in radeon_acpi_pcie_performance_request()
617 return -EINVAL; in radeon_acpi_pcie_performance_request()
620 /* client id (bit 2-0: func num, 7-3: dev num, 15-8: bus num) */ in radeon_acpi_pcie_performance_request()
621 atcs_input.client_id = pci_dev_id(rdev->pdev); in radeon_acpi_pcie_performance_request()
632 while (retry--) { in radeon_acpi_pcie_performance_request()
635 return -EIO; in radeon_acpi_pcie_performance_request()
639 size = *(u16 *) info->buffer.pointer; in radeon_acpi_pcie_performance_request()
643 return -EINVAL; in radeon_acpi_pcie_performance_request()
647 memcpy(&atcs_output, info->buffer.pointer, size); in radeon_acpi_pcie_performance_request()
654 return -EINVAL; in radeon_acpi_pcie_performance_request()
667 * radeon_acpi_event - handle notify events
673 * Calls relevant radeon functions in response to various
684 if (strcmp(entry->device_class, ACPI_AC_CLASS) == 0) { in radeon_acpi_event()
699 * radeon_acpi_init - init driver acpi support
710 struct radeon_atif *atif = &rdev->atif; in radeon_acpi_init()
711 struct radeon_atcs *atcs = &rdev->atcs; in radeon_acpi_init()
715 handle = ACPI_HANDLE(&rdev->pdev->dev); in radeon_acpi_init()
718 if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle) in radeon_acpi_init()
731 goto out; in radeon_acpi_init()
734 if (atif->notifications.brightness_change) { in radeon_acpi_init()
739 list_for_each_entry(tmp, &rdev_to_drm(rdev)->mode_config.encoder_list, in radeon_acpi_init()
743 if ((enc->devices & (ATOM_DEVICE_LCD_SUPPORT)) && in radeon_acpi_init()
744 enc->enc_priv) { in radeon_acpi_init()
745 if (rdev->is_atom_bios) { in radeon_acpi_init()
746 struct radeon_encoder_atom_dig *dig = enc->enc_priv; in radeon_acpi_init()
747 if (dig->bl_dev) { in radeon_acpi_init()
752 struct radeon_encoder_lvds *dig = enc->enc_priv; in radeon_acpi_init()
753 if (dig->bl_dev) { in radeon_acpi_init()
761 atif->encoder_for_bl = target; in radeon_acpi_init()
764 if (atif->functions.sbios_requests && !atif->functions.system_params) { in radeon_acpi_init()
769 atif->functions.system_params = true; in radeon_acpi_init()
772 if (atif->functions.system_params) { in radeon_acpi_init()
774 &atif->notification_cfg); in radeon_acpi_init()
779 atif->notification_cfg.enabled = false; in radeon_acpi_init()
783 out: in radeon_acpi_init()
784 rdev->acpi_nb.notifier_call = radeon_acpi_event; in radeon_acpi_init()
785 register_acpi_notifier(&rdev->acpi_nb); in radeon_acpi_init()
791 * radeon_acpi_fini - tear down driver acpi support
799 unregister_acpi_notifier(&rdev->acpi_nb); in radeon_acpi_fini()