u32 tmp, viewport_w, viewport_h;
int r;
bool bypass_lut = false;
- const char *format_name;
+ char *format_name;
/* no fb bound */
if (!atomic && !crtc->primary->fb) {
u32 tmp, viewport_w, viewport_h;
int r;
bool bypass_lut = false;
- const char *format_name;
+ char *format_name;
/* no fb bound */
if (!atomic && !crtc->primary->fb) {
u32 viewport_w, viewport_h;
int r;
bool bypass_lut = false;
- const char *format_name;
+ char *format_name;
/* no fb bound */
if (!atomic && !crtc->primary->fb) {
/* Check whether this plane supports the fb pixel format. */
ret = drm_plane_check_pixel_format(plane, state->fb->pixel_format);
if (ret) {
- const char *format_name = drm_get_format_name(state->fb->pixel_format);
+ char *format_name = drm_get_format_name(state->fb->pixel_format);
DRM_DEBUG_ATOMIC("Invalid pixel format %s\n", format_name);
kfree(format_name);
return ret;
/* Check whether this plane supports the fb pixel format. */
ret = drm_plane_check_pixel_format(plane, fb->pixel_format);
if (ret) {
- const char *format_name = drm_get_format_name(fb->pixel_format);
+ char *format_name = drm_get_format_name(fb->pixel_format);
DRM_DEBUG_KMS("Invalid pixel format %s\n", format_name);
kfree(format_name);
goto out;
ret = drm_plane_check_pixel_format(crtc->primary,
fb->pixel_format);
if (ret) {
- const char *format_name = drm_get_format_name(fb->pixel_format);
+ char *format_name = drm_get_format_name(fb->pixel_format);
DRM_DEBUG_KMS("Invalid pixel format %s\n", format_name);
kfree(format_name);
goto out;
static int format_check(const struct drm_mode_fb_cmd2 *r)
{
uint32_t format = r->pixel_format & ~DRM_FORMAT_BIG_ENDIAN;
- const char *format_name;
+ char *format_name;
switch (format) {
case DRM_FORMAT_C8:
ret = format_check(r);
if (ret) {
- const char *format_name = drm_get_format_name(r->pixel_format);
+ char *format_name = drm_get_format_name(r->pixel_format);
DRM_DEBUG_KMS("bad framebuffer format %s\n", format_name);
kfree(format_name);
return ret;
* Note that the buffer returned by this function is owned by the caller
* and will need to be freed using kfree().
*/
-const char *drm_get_format_name(uint32_t format)
+char *drm_get_format_name(uint32_t format)
{
char *buf = kmalloc(32, GFP_KERNEL);
void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth,
int *bpp)
{
- const char *format_name;
+ char *format_name;
switch (format) {
case DRM_FORMAT_C8:
u32 ch, u32 y, u32 in_h, u32 fmt)
{
struct drm_gem_cma_object *obj = drm_fb_cma_get_gem_obj(fb, 0);
- const char *format_name;
+ char *format_name;
u32 reg_ctrl, reg_addr, reg_size, reg_stride, reg_space, reg_en;
u32 stride = fb->pitches[0];
u32 addr = (u32)obj->paddr + y * stride;
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
struct drm_plane_state *state;
struct drm_plane *plane = &intel_plane->base;
- const char *format_name;
+ char *format_name;
if (!plane->state) {
seq_puts(m, "plane->state is NULL!\n");
crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
if (state->fb && intel_rotation_90_or_270(state->rotation)) {
- const char *format_name;
+ char *format_name;
if (!(state->fb->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
state->fb->modifier[0] == I915_FORMAT_MOD_Yf_TILED)) {
DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
DRM_DEBUG_KMS("planes on this crtc\n");
list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
- const char *format_name;
+ char *format_name;
intel_plane = to_intel_plane(plane);
if (intel_plane->pipe != crtc->pipe)
continue;
unsigned int aligned_height;
int ret;
u32 pitch_limit, stride_alignment;
- const char *format_name;
+ char *format_name;
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
u32 tmp, viewport_w, viewport_h;
int r;
bool bypass_lut = false;
- const char *format_name;
+ char *format_name;
/* no fb bound */
if (!atomic && !crtc->primary->fb) {
u32 viewport_w, viewport_h;
int r;
bool bypass_lut = false;
- const char *format_name;
+ char *format_name;
/* no fb bound */
if (!atomic && !crtc->primary->fb) {
int drm_format_vert_chroma_subsampling(uint32_t format);
int drm_format_plane_width(int width, uint32_t format, int plane);
int drm_format_plane_height(int height, uint32_t format, int plane);
-const char *drm_get_format_name(uint32_t format) __malloc;
+char *drm_get_format_name(uint32_t format) __malloc;
#endif /* __DRM_FOURCC_H__ */