drm/i915/opregion: use BUILD_BUG_ON to verify mailbox struct sizes
Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
856974a401
commit
2d80391d36
1 changed files with 5 additions and 0 deletions
|
@ -862,6 +862,11 @@ int intel_opregion_setup(struct drm_device *dev)
|
||||||
char buf[sizeof(OPREGION_SIGNATURE)];
|
char buf[sizeof(OPREGION_SIGNATURE)];
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
BUILD_BUG_ON(sizeof(struct opregion_header) != 0x100);
|
||||||
|
BUILD_BUG_ON(sizeof(struct opregion_acpi) != 0x100);
|
||||||
|
BUILD_BUG_ON(sizeof(struct opregion_swsci) != 0x100);
|
||||||
|
BUILD_BUG_ON(sizeof(struct opregion_asle) != 0x100);
|
||||||
|
|
||||||
pci_read_config_dword(dev->pdev, PCI_ASLS, &asls);
|
pci_read_config_dword(dev->pdev, PCI_ASLS, &asls);
|
||||||
DRM_DEBUG_DRIVER("graphic opregion physical addr: 0x%x\n", asls);
|
DRM_DEBUG_DRIVER("graphic opregion physical addr: 0x%x\n", asls);
|
||||||
if (asls == 0) {
|
if (asls == 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue