Skip to content

Commit

Permalink
add build-time hint to specify the gpu
Browse files Browse the repository at this point in the history
relates to #57
  • Loading branch information
kfix committed Nov 28, 2019
1 parent 0fe2ef4 commit 02dcf6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DDC.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
#define kMaxRequests 10
#endif

#ifndef kDDCMinReplyDelay
// https://github.com/kfix/ddcctl/issues/57
_Static_assert (0, "must build with `make (amd|intel|nvidia)`");
#endif

#ifndef _IOKIT_IOFRAMEBUFFER_H
#define kIOFBDependentIDKey "IOFBDependentID"
#define kIOFBDependentIndexKey "IOFBDependentIndex"
Expand Down Expand Up @@ -212,7 +217,7 @@ bool DDCRead(CGDirectDisplayID displayID, struct DDCReadCommand *read) {
// Relying on retry will not help if the delay is too short.
request.minReplyDelay = kDDCMinReplyDelay * kNanosecondScale;
// FIXME: this should be tuneable at runtime
// https://github.com/kfix/-vendorddcctl/issues/57
// https://github.com/kfix/ddcctl/issues/57
// incorrect values for GPU-vendor can cause kernel panic
// https://developer.apple.com/documentation/iokit/ioi2crequest/1410394-minreplydelay?language=objc

Expand Down

0 comments on commit 02dcf6c

Please sign in to comment.