summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_cp.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-03-06 02:03:10 +0800
committerChia-I Wu <[email protected]>2015-03-06 02:25:03 +0800
commit4ddd981e407f9e97fcbb862c241f1ce165616fd4 (patch)
tree5127116d96ae302939b00c7ad718796899fc95c1 /src/gallium/drivers/ilo/ilo_cp.c
parent70ef171e91582f60a010a4f0ea9f7ff5ba971ab4 (diff)
ilo: add more convenient intel_bo_{ref,unref}()
They both check for NULL and intel_bo_ref() returns the referenced bo. They replace intel_bo_{reference,unreference}().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_cp.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_cp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c
index f78fd1f62f9..9d2dffd5e16 100644
--- a/src/gallium/drivers/ilo/ilo_cp.c
+++ b/src/gallium/drivers/ilo/ilo_cp.c
@@ -163,10 +163,8 @@ ilo_cp_submit_internal(struct ilo_cp *cp)
if (!err) {
bool guilty;
- if (cp->last_submitted_bo)
- intel_bo_unreference(cp->last_submitted_bo);
- cp->last_submitted_bo = bo;
- intel_bo_reference(cp->last_submitted_bo);
+ intel_bo_unref(cp->last_submitted_bo);
+ cp->last_submitted_bo = intel_bo_ref(bo);
guilty = ilo_cp_detect_hang(cp);