drm: Nuke fb->depth
Replace uses of fb->depth with fb->format->depth. Less duplicate information is a good thing. @@ struct drm_framebuffer *fb; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - fb->depth = E; ... } @@ struct nouveau_framebuffer *fb; @@ - fb->base.depth + fb->base.format->depth @@ struct drm_framebuffer fb; @@ - fb.depth + fb.format->depth @@ struct drm_framebuffer *fb; @@ - fb->depth + fb->format->depth @@ struct drm_framebuffer fb; @@ - (fb.format->depth) + fb.format->depth @@ struct drm_framebuffer *fb; @@ - (fb->format->depth) + fb->format->depth @@ @@ struct drm_framebuffer { ... - unsigned int depth; ... }; v2: Drop the vmw stuff (Daniel) Rerun spatch due to code changes Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com
此提交包含在:
@@ -217,7 +217,7 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
|
||||
info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base;
|
||||
info->apertures->ranges[0].size = mdev->mc.vram_size;
|
||||
|
||||
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
|
||||
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
|
||||
drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,
|
||||
sizes->fb_height);
|
||||
|
||||
|
@@ -39,10 +39,10 @@ static void mga_crtc_load_lut(struct drm_crtc *crtc)
|
||||
WREG8(DAC_INDEX + MGA1064_INDEX, 0);
|
||||
|
||||
if (fb && fb->bits_per_pixel == 16) {
|
||||
int inc = (fb->depth == 15) ? 8 : 4;
|
||||
int inc = (fb->format->depth == 15) ? 8 : 4;
|
||||
u8 r, b;
|
||||
for (i = 0; i < MGAG200_LUT_SIZE; i += inc) {
|
||||
if (fb->depth == 16) {
|
||||
if (fb->format->depth == 16) {
|
||||
if (i > (MGAG200_LUT_SIZE >> 1)) {
|
||||
r = b = 0;
|
||||
} else {
|
||||
@@ -947,7 +947,7 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||
dacvalue[MGA1064_MUL_CTL] = MGA1064_MUL_CTL_8bits;
|
||||
break;
|
||||
case 16:
|
||||
if (fb->depth == 15)
|
||||
if (fb->format->depth == 15)
|
||||
dacvalue[MGA1064_MUL_CTL] = MGA1064_MUL_CTL_15bits;
|
||||
else
|
||||
dacvalue[MGA1064_MUL_CTL] = MGA1064_MUL_CTL_16bits;
|
||||
|
新增問題並參考
封鎖使用者