intel: Fix bufmgr_gem->gen for gen > 4
PATCH 1/1 intel: Fix bufmgr_gem->gen for gen > 4
If the pci_device's actual gen was > 4, then we stupidly set bufmgr_gem->gen = 6.
--- intel/intel_bufmgr_gem.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
intel/intel_bufmgr_gem.c +7 -1
@@ -2321,8 +2321,14 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) bufmgr_gem->gen =3 ; else if (IS_GEN4(bufmgr_gem->pci_device)) bufmgr_gem->gen = 4; - else + else if (IS_GEN5(bufmgr_gem->pci_device)) + bufmgr_gem->gen = 5; + else if (IS_GEN6(bufmgr_gem->pci_device)) bufmgr_gem->gen = 6; + else if (IS_GEN7(bufmgr_gem->pci_device)) + bufmgr_gem->gen = 7; + else + assert(0);if (IS_GEN3 (bufmgr_gem->pci_device) && bufmgr_gem->gtt_size >256 *1024 *1024 ) {
Signature · 1 line
1.7.7.5
Quoted 5 lines · Chad Versace
If the pci_device's actual gen was > 4, then we stupidly set
bufmgr_gem->gen= 6.Signed-off-by Chad Versace <[email protected]>
I was thinking on maybe making this more future-proof to help the possible
Quoted 1 line
=7 gen devices, but I guess we can add a new check for them when the time
comes.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · Chad Versace
If the pci_device's actual gen was > 4, then we stupidly set
bufmgr_gem->gen= 6.
Might be worth a note to say that no behavior should change. Still,
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Eric Anholt
Quoted 2 lines · Chad Versace
If the pci_device's actual gen was > 4, then we stupidly set
bufmgr_gem->gen= 6.Might be worth a note to say that no behavior should change. Still,
Reviewed-by Eric Anholt <[email protected]>
Pushed, with a note about no change in behavior.
----
Chad Versace
[email protected]
Quoted 7 lines · Eric Anholt
Quoted 2 lines · Chad Versace
If the pci_device's actual gen was> 4, then we stupidly set
bufmgr_gem->gen= 6.Might be worth a note to say that no behavior should change. Still,
Reviewed-by Eric Anholt<[email protected]>
Right, I'm curious if this fixed anything.