From owner-freebsd-x11@FreeBSD.ORG Fri Apr 9 16:53:49 2010 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CF76106567A for ; Fri, 9 Apr 2010 16:53:49 +0000 (UTC) (envelope-from davshao@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id F0E558FC3A for ; Fri, 9 Apr 2010 16:53:48 +0000 (UTC) Received: by gwaa12 with SMTP id a12so2022973gwa.13 for ; Fri, 09 Apr 2010 09:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=j1GlzjuNTiOK+X0yri1Q+11DXuVkieKLnkMTbGpIQ/8=; b=xf/rQIhIC4oT9b7NgBRftuq/t4d2v4F+a2SdyowxZgND4GsFiJz5nuDsfsQFZbPGvi QNwqzpDUpM0q105ENooIMcf+lE3F3pkbIPZqKMv0aociryXdnJazHhfd1F7uFvWTMDkj P1p4OGkT+6PFdECGgc0LmFCkfp0LYRZoioDXg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=w9cPeC6Ii2RAz+AEoAonw4RHtOm1RNKx2amCRBIGTcNXKhoKxWfX6ydf2PxYIVUx+z eppPX41av4+NQebLMafkbCT0/uK4tTO4ZL7szniIlISOnHloMLtB9LgGknuEuS14ownT V5mqktH9yLIMo8q5Fpl+R9OEUKxriBVAewtvE= MIME-Version: 1.0 Received: by 10.100.191.7 with HTTP; Fri, 9 Apr 2010 09:31:54 -0700 (PDT) Date: Fri, 9 Apr 2010 09:31:54 -0700 Received: by 10.101.166.40 with SMTP id t40mr417840ano.10.1270830714363; Fri, 09 Apr 2010 09:31:54 -0700 (PDT) Message-ID: From: David Shao To: freebsd-x11@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Parts of drm ported to DragonFlyBSD and a GSoC offer to help with GEM/KMS X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 16:53:49 -0000 A big thanks to Robert Noland and an offer to help. Parts of the drm from current have been ported to DragonFlyBSD 2.7.0 development, x86_64, and are being tested in git branches. With the latest git versions of the X.org stack including Mesa and libdrm, the usual demos from Mesa can be run for r600. What has been specifically tested is a Radeon HD 4550 on a Shuttle SG45H7, Intel 64-bit. An evolving report can be seen at http://www.dragonflybsd.org/docs/developer/GEMdrmKMS/ I readily recognize that I hardly did much more than cut and paste of already existing FreeBSD code. I even used the kern_subr.c and hash.h code to have a hashtable implementation with hashdestroy(). I am a CS masters student at San Jose State who will be submitting a GSoC application to create a cross-BSD porting layer for GEM/KMS. I have an idea of preserving as much of the Linux code as possible so that it is easier to contribute back to the drm developers who have enough problems just finishing their code for Linux. >From what I can tell the next step is to basically reimplement some version of Linux's idr (small integer ID management) API using radix trees, or more simply just to see performance, to get any version of the API, brute force the searches using the current red-black tree. I welcome correction, but looking at the code what exists now is a partial solution using unrhdr where the smallest available integer is returned while what the idr API is being used for sometimes calls for the smallest available integer above a certain floor. This kind of problem appears in several aspects of kernel programming which is no doubt why Linux implemented this abstraction. And there is hardly a shortage of radix tree implementations available for the BSDs to use.