Path: blob/master/drivers/gpu/drm/nouveau/nouveau_util.h
15112 views
/*1* Copyright (C) 2010 Nouveau Project2*3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining6* a copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sublicense, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial15* portions of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,18* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.20* IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE21* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION22* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION23* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25*/2627#ifndef __NOUVEAU_UTIL_H__28#define __NOUVEAU_UTIL_H__2930struct nouveau_bitfield {31u32 mask;32const char *name;33};3435struct nouveau_enum {36u32 value;37const char *name;38void *data;39};4041void nouveau_bitfield_print(const struct nouveau_bitfield *, u32 value);42void nouveau_enum_print(const struct nouveau_enum *, u32 value);43const struct nouveau_enum *44nouveau_enum_find(const struct nouveau_enum *, u32 value);4546int nouveau_ratelimit(void);4748#endif495051