Re: [PATCH libdrm v2] intel: error out on has_error in exec2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 31, 2015 at 08:01:21PM +0100, Emil Velikov wrote:
> > Reusing bo_gem here is a little worrying as it would be very easy for
> > someone to add code to the end of the function thinking that bo_gem
> > still was the batch.
> >
> Doesn't this concert apply to drm_intel_gem_bo_exec() as well ?

Probably. Haven't looked at that in years. :p

> > If we had
> >
> > static inline drm_intel_bo_gem *to_bo_gem(drm_intel_bo *bo)
> > {
> >         return (drm_intel_bo_gem *)bo;
> > }
> >
> > then we can start doing one offs like
> >
> > if (to_bo_gem(bo)->has_error) return -ENOMEM;
> >
> > and of course
> >         for (i = 0; i < bufmgr_gem->exec_count; i++) {
> >                 drm_intel_bo_gem *bo_gem = to_bo_gem(bufmgr_gem->exec_bos[i]);
> 
> How about we do this as a follow up patch (4.1/17) that covers both functions ?

If you are quick...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux