drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c
Extension
.c
Size
4661 bytes
Lines
129
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (cmd.dp_hpd_notify.hpd_data.hpd_type == DP_HPD) {
			notify->type = DMUB_NOTIFICATION_HPD;
			notify->hpd_status = cmd.dp_hpd_notify.hpd_data.hpd_status;
		} else {
			notify->type = DMUB_NOTIFICATION_HPD_IRQ;
		}

		notify->instance = cmd.dp_hpd_notify.hpd_data.instance;
		notify->result = AUX_RET_SUCCESS;
		break;
	case DMUB_OUT_CMD__SET_CONFIG_REPLY:
		notify->type = DMUB_NOTIFICATION_SET_CONFIG_REPLY;
		notify->instance = cmd.set_config_reply.set_config_reply_control.instance;
		notify->sc_status = cmd.set_config_reply.set_config_reply_control.status;
		break;
	case DMUB_OUT_CMD__DPIA_NOTIFICATION:
		notify->type = DMUB_NOTIFICATION_DPIA_NOTIFICATION;
		notify->instance = cmd.dpia_notification.payload.header.instance;
		break;
	case DMUB_OUT_CMD__HPD_SENSE_NOTIFY:
		notify->type = DMUB_NOTIFICATION_HPD_SENSE_NOTIFY;
		dmub_memcpy(&notify->hpd_sense_notify,
			    &cmd.hpd_sense_notify.data,
			    sizeof(cmd.hpd_sense_notify.data));
		break;
	case DMUB_OUT_CMD__FUSED_IO:
		notify->type = DMUB_NOTIFICATION_FUSED_IO;
		dmub_memcpy(&notify->fused_request, &cmd.fused_io.request, sizeof(cmd.fused_io.request));
		break;
	default:
		notify->type = DMUB_NOTIFICATION_NO_DATA;
		break;
	}

	/* Pop outbox1 ringbuffer and update read pointer */
	dmub_rb_pop_front(&dmub->outbox1_rb);
	dmub->hw_funcs.set_outbox1_rptr(dmub, dmub->outbox1_rb.rptr);

	/**
	 * Notify dc whether dmub has a pending outbox message,
	 * this is to avoid one more call to dmub_srv_stat_get_notification
	 */
	if (dmub_rb_empty(&dmub->outbox1_rb))
		notify->pending_notification = false;
	else
		notify->pending_notification = true;

	return DMUB_STATUS_OK;
}

Annotation

Implementation Notes