From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 1/2] intel: Add accessor to get HW context ID from a drm_intel_context Date: Tue, 12 Nov 2013 23:08:17 -0800 Message-ID: <20131113070816.GA26107@bwidawsk.net> References: <1384192107-14314-1-git-send-email-idr@freedesktop.org> <87txfig16k.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <87txfig16k.fsf@eliezer.anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Eric Anholt Cc: Ian Romanick , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Nov 11, 2013 at 11:58:59AM -0800, Eric Anholt wrote: > Ian Romanick writes: > > > From: Ian Romanick > > > > The drm_intel_context structure is, wisely, opaque. However, libdrm > > users may want to know the hardware context ID associated with the > > structure. > > We've had a bunch of our other structures be partially transparent. The > context id to be passed to the kernel could easily be public just like > the gem handle in a BO is public. I would lean slightly toward that. > > But I don't feel strongly either way, so these two are: > > Reviewed-by: Eric Anholt I think my preference would be to add a "context" argument to a libdrm get_hangstats function, but if you feel this way is better, it is fine with me. My only [slight, unjustified] concern is that once you make the id transparent, we can't play any games. Since the DDX doesn't use libdrm however, I think it is fairly moot. Acked-by: Ben Widawsky -- Ben Widawsky, Intel Open Source Technology Center