/* * Copyright(c) 2011-2016 Intel Corporation. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Authors: * Zhi Wang <[email protected]> * * Contributors: * Changbin Du <[email protected]> * */ #include <linux/firmware.h> #include <linux/crc32.h> #include <linux/vmalloc.h> #include "i915_drv.h" #include "gvt.h" #include "i915_pvinfo.h" #define FIRMWARE_VERSION … struct gvt_firmware_header { … }; #define dev_to_drm_minor(d) … static BIN_ATTR_SIMPLE_ADMIN_RO(gvt_firmware); static int expose_firmware_sysfs(struct intel_gvt *gvt) { … } static void clean_firmware_sysfs(struct intel_gvt *gvt) { … } /** * intel_gvt_free_firmware - free GVT firmware * @gvt: intel gvt device * */ void intel_gvt_free_firmware(struct intel_gvt *gvt) { … } static int verify_firmware(struct intel_gvt *gvt, const struct firmware *fw) { … } #define GVT_FIRMWARE_PATH … /** * intel_gvt_load_firmware - load GVT firmware * @gvt: intel gvt device * */ int intel_gvt_load_firmware(struct intel_gvt *gvt) { … }