Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9da12b6a authored by Rob Clark's avatar Rob Clark Committed by Dave Airlie
Browse files

drm: psuedocolor support for ARGB modes



If there is an alpha channel, need to mask in 1's in the alpha channel
to prevent the fb from being completely transparent.

Signed-off-by: default avatarRob Clark <rob@ti.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a250b9fd
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -627,6 +627,11 @@ static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
		value = (red << info->var.red.offset) |
		value = (red << info->var.red.offset) |
			(green << info->var.green.offset) |
			(green << info->var.green.offset) |
			(blue << info->var.blue.offset);
			(blue << info->var.blue.offset);
		if (info->var.transp.length > 0) {
			u32 mask = (1 << info->var.transp.length) - 1;
			mask <<= info->var.transp.offset;
			value |= mask;
		}
		palette[regno] = value;
		palette[regno] = value;
		return 0;
		return 0;
	}
	}