Rev 5354 | Rev 6084 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5354 | Rev 5367 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | * is seriously wrong. |
125 | * is seriously wrong. |
126 | */ |
126 | */ |
127 | r = devm_request_mem_region(dev->dev, base, dev_priv->gtt.stolen_size, |
127 | r = devm_request_mem_region(dev->dev, base, dev_priv->gtt.stolen_size, |
128 | "Graphics Stolen Memory"); |
128 | "Graphics Stolen Memory"); |
129 | if (r == NULL) { |
129 | if (r == NULL) { |
- | 130 | /* |
|
- | 131 | * One more attempt but this time requesting region from |
|
- | 132 | * base + 1, as we have seen that this resolves the region |
|
- | 133 | * conflict with the PCI Bus. |
|
- | 134 | * This is a BIOS w/a: Some BIOS wrap stolen in the root |
|
- | 135 | * PCI bus, but have an off-by-one error. Hence retry the |
|
- | 136 | * reservation starting from 1 instead of 0. |
|
- | 137 | */ |
|
- | 138 | r = devm_request_mem_region(dev->dev, base + 1, |
|
- | 139 | dev_priv->gtt.stolen_size - 1, |
|
- | 140 | "Graphics Stolen Memory"); |
|
- | 141 | /* |
|
- | 142 | * GEN3 firmware likes to smash pci bridges into the stolen |
|
- | 143 | * range. Apparently this works. |
|
- | 144 | */ |
|
- | 145 | if (r == NULL && !IS_GEN3(dev)) { |
|
130 | DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n", |
146 | DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n", |
131 | base, base + (uint32_t)dev_priv->gtt.stolen_size); |
147 | base, base + (uint32_t)dev_priv->gtt.stolen_size); |
132 | base = 0; |
148 | base = 0; |
133 | } |
149 | } |
- | 150 | } |
|
134 | #endif |
151 | #endif |
135 | return base; |
152 | return base; |
136 | } |
153 | } |
Line 137... | Line 154... | ||
137 | 154 | ||
Line 224... | Line 241... | ||
224 | 241 | ||
225 | err_fb: |
242 | err_fb: |
226 | kfree(compressed_llb); |
243 | kfree(compressed_llb); |
227 | drm_mm_remove_node(&dev_priv->fbc.compressed_fb); |
244 | drm_mm_remove_node(&dev_priv->fbc.compressed_fb); |
- | 245 | err_llb: |
|
228 | err_llb: |
246 | pr_info_once("drm: not enough stolen space for compressed buffer (need %d more bytes), disabling. Hint: you may be able to increase stolen memory size in the BIOS to avoid this.\n", size); |
229 | return -ENOSPC; |
247 | return -ENOSPC; |
Line 230... | Line 248... | ||
230 | } |
248 | } |
231 | 249 |