On Mon, Aug 25, 2014 at 7:00 PM, Ian Romanick <i...@freedesktop.org> wrote: > On 08/25/2014 06:26 AM, Victor Rodriguez wrote: >> >> HI >> >> I am new in Mesa. I am trying to compile mesa in a x86 system. After >> installing all the required packages and ussing the following configure >> command line: >> >> ./configure --with-dri-drivers="i915" --with-gallium-drivers="" > > Unless you have a very old Intel chipset, you probably want i965. > > But Emil's comments about the rest seem correct. > >> make >> >> shows this error: >> >> loader.c:495:24: fatal error: radeon_drm.h: No such file or directory >> #include <radeon_drm.h> >> >> >> After checking on the source code: >> >> #if !defined(__NOT_HAVE_DRM_H) >> /* for i915 */ >> #include <i915_drm.h> >> /* for radeon */ >> #include <radeon_drm.h> >> >> static int >> drm_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) >> { >> drmVersionPtr version; >> >> *chip_id = -1; >> >> version = drmGetVersion(fd); >> if (!version) { >> log_(_LOADER_WARNING, "MESA-LOADER: invalid drm fd\n"); >> return 0; >> } >> if (!version->name) { >> log_(_LOADER_WARNING, "MESA-LOADER: unable to determine the driver >> name\n"); >> drmFreeVersion(version); >> return 0; >> } >> >> if (strcmp(version->name, "i915") == 0) { >> struct drm_i915_getparam gp; >> int ret; >> >> *vendor_id = 0x8086; >> >> memset(&gp, 0, sizeof(gp)); >> gp.param = I915_PARAM_CHIPSET_ID; >> gp.value = chip_id; >> ret = drmCommandWriteRead(fd, DRM_I915_GETPARAM, &gp, sizeof(gp)); >> if (ret) { >> log_(_LOADER_WARNING, "MESA-LOADER: failed to get param for >> i915\n"); >> *chip_id = -1; >> } >> } >> else if (strcmp(version->name, "radeon") == 0) { >> struct drm_radeon_info info; >> int ret; >> >> *vendor_id = 0x1002; >> >> memset(&info, 0, sizeof(info)); >> info.request = RADEON_INFO_DEVICE_ID; >> info.value = (unsigned long) chip_id; >> ret = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); >> if (ret) { >> >> >> I have read the documentation and the config help. Does any body know >> how can I specify the define : NOT_HAVE_DRM_H >> >> I don't want to install the radeon libraries ( because I don't need >> them :) ) >> >> Any help is more than appreciated >> >> Regards >> >> Victor Rodriguez >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev >> >
Hi thanks a lot for the help My Mesa is working more than fine , however I was wondering if you think that could be better to just include the correct *drm.h instead on the specific function that requires , ie: static int drm_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) { #include <radeon_drm.h> Of course it is not a functional code , I just try to say that with this new organization each *drm.h might be included just on the function that is required and the libdrm packages could be more slim for each architecture ( why should I have a radeon.h file if I do not have a readeon card? ) This is just an idea, any feedback is more than welcome Regards Victor Rodriguez _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev