
# Checking Version of Out-of-Tree drivers

Out-of-tree(OoT) driver provides information about base DII version as well as backported version.

## Versioning Format
### I915\_<DII_TAG_VALUE>\_<BRANCH_TYPE>_<BACKPORT_MAJOR>.<BACKPORT_MINOR>

### DII_TAG_VALUE:
Provides information of DII tag from which backports are derived.

| DII_TAG_VALUE | Based DII Branch | DII Tag |
|--- |--- |---|
| XXXX | DII Mainline | DII_XXXX_prerelease |
| YY.MM.RR | DII Product Stablization Branch| I915-YY.MM.RR |

### BRANCH_TYPE
Provides information regarding type of release branch

| BRANCH_TYPE | Based DII Branch |
|--- |---|
| PRERELEASE | DII Mainline |
| PSB | DII Product Stablization Branch|

### BACKPORT_MAJOR:
Backport version, date at the time of first release in YYMMDD format.
Example: 231129 --> indicates release created on 29th Nov 2023.

### BACKPORT_MINOR:
Backport hot-fixes on base release.
Example: 231129.4 --> indicates 4th hotfix release on top of base release(231129.0).


## Backport version information can be extracted by following means
Sample data based on I915_23.10.6_PSB_231129.4 and Backport Major and Minor 231129.4 on Ubuntu 5.15.0-56. The same information can be extracted for other OS Distributions or kernels.

### 1) Kernel log:
The backported OoT driver version are being printed in kernel log during i915 loading.
```
$ dmesg
...
...
[    7.702943] Loading modules backported from I915_23.10.6
[    7.710365] Backport generated by backports.git I915_23.10.6_PSB_231129.4
[    7.837760] [drm] I915 BACKPORTED INIT
...
...
```

### 2) Sysfs Entry:
The backported OoT driver's version is maintained in the sysfs entry of the i915 module.
```
$ cat /sys/module/i915/version

Sample output:
backported to 5.15.0-56 from (248afa0079d2e0) using backports I915_23.10.6_PSB_231129.4
```

### 3) Module info:
Backport version information is added in the modules also. Which can be extracted via 'modinfo' utility command.

```
$ sudo modinfo i915

Sample output:
version: backported to 5.15.0-56 from (248afa0079d2e0) using backports I915_23.10.6_PSB_231129.4
```
