wndw.c (ebf8ca6b3d6d7310646b092f3d5219abe2858e81) | wndw.c (38a72243235ecf2c1359ce66ebed29a7dfb680f7) |
---|---|
1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 190 unchanged lines hidden (view full) --- 199 asyw->image.colorspace = 1; 200 return 0; 201} 202 203static int 204nv50_wndw_atomic_check_acquire_rgb(struct nv50_wndw_atom *asyw) 205{ 206 switch (asyw->state.fb->format->format) { | 1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 190 unchanged lines hidden (view full) --- 199 asyw->image.colorspace = 1; 200 return 0; 201} 202 203static int 204nv50_wndw_atomic_check_acquire_rgb(struct nv50_wndw_atom *asyw) 205{ 206 switch (asyw->state.fb->format->format) { |
207 case DRM_FORMAT_C8 : asyw->image.format = 0x1e; break; 208 case DRM_FORMAT_XRGB8888 : 209 case DRM_FORMAT_ARGB8888 : asyw->image.format = 0xcf; break; 210 case DRM_FORMAT_RGB565 : asyw->image.format = 0xe8; break; 211 case DRM_FORMAT_XRGB1555 : 212 case DRM_FORMAT_ARGB1555 : asyw->image.format = 0xe9; break; 213 case DRM_FORMAT_XBGR2101010: 214 case DRM_FORMAT_ABGR2101010: asyw->image.format = 0xd1; break; 215 case DRM_FORMAT_XBGR8888 : 216 case DRM_FORMAT_ABGR8888 : asyw->image.format = 0xd5; break; 217 case DRM_FORMAT_XRGB2101010: 218 case DRM_FORMAT_ARGB2101010: asyw->image.format = 0xdf; break; | 207 case DRM_FORMAT_C8 : asyw->image.format = 0x1e; break; 208 case DRM_FORMAT_XRGB8888 : 209 case DRM_FORMAT_ARGB8888 : asyw->image.format = 0xcf; break; 210 case DRM_FORMAT_RGB565 : asyw->image.format = 0xe8; break; 211 case DRM_FORMAT_XRGB1555 : 212 case DRM_FORMAT_ARGB1555 : asyw->image.format = 0xe9; break; 213 case DRM_FORMAT_XBGR2101010 : 214 case DRM_FORMAT_ABGR2101010 : asyw->image.format = 0xd1; break; 215 case DRM_FORMAT_XBGR8888 : 216 case DRM_FORMAT_ABGR8888 : asyw->image.format = 0xd5; break; 217 case DRM_FORMAT_XRGB2101010 : 218 case DRM_FORMAT_ARGB2101010 : asyw->image.format = 0xdf; break; 219 case DRM_FORMAT_XBGR16161616F: 220 case DRM_FORMAT_ABGR16161616F: asyw->image.format = 0xca; break; |
219 default: 220 return -EINVAL; 221 } 222 asyw->image.colorspace = 0; 223 return 0; 224} 225 226static int --- 427 unchanged lines hidden --- | 221 default: 222 return -EINVAL; 223 } 224 asyw->image.colorspace = 0; 225 return 0; 226} 227 228static int --- 427 unchanged lines hidden --- |