Skip to content

Commit c258f91

Browse files
committed
drm/i915/gtt: Tidy up duplicate branches in gen8_gmch_probe()
Following commit f773568 ("drm/i915: nuke the duplicated stolen discovery"), the if-else-chain for determining the GTT size is redundant with the !chv branches all being the same. Reported-by: Ville Syrjälä <[email protected]> References: f773568 ("drm/i915: nuke the duplicated stolen discovery") Signed-off-by: Chris Wilson <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Ville Syrjälä <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 47d4cb8 commit c258f91

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,14 +3326,10 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
33263326
DRM_ERROR("Can't set DMA mask/consistent mask (%d)\n", err);
33273327

33283328
pci_read_config_word(pdev, SNB_GMCH_CTRL, &snb_gmch_ctl);
3329-
3330-
if (INTEL_GEN(dev_priv) >= 9) {
3331-
size = gen8_get_total_gtt_size(snb_gmch_ctl);
3332-
} else if (IS_CHERRYVIEW(dev_priv)) {
3329+
if (IS_CHERRYVIEW(dev_priv))
33333330
size = chv_get_total_gtt_size(snb_gmch_ctl);
3334-
} else {
3331+
else
33353332
size = gen8_get_total_gtt_size(snb_gmch_ctl);
3336-
}
33373333

33383334
ggtt->base.total = (size / sizeof(gen8_pte_t)) << PAGE_SHIFT;
33393335
ggtt->base.cleanup = gen6_gmch_remove;

0 commit comments

Comments
 (0)