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

Commit 7d6aa80c authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

drm/radeon/kms/atom: clean up op_mask handler



Readability cleanup and fix debugging output, no
functional change.
Reported-by: default avatarFrank Huang <FrankR.Huang@amd.com>

Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent b61c99de
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -733,16 +733,16 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg)
static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
{
{
	uint8_t attr = U8((*ptr)++);
	uint8_t attr = U8((*ptr)++);
	uint32_t dst, src1, src2, saved;
	uint32_t dst, mask, src, saved;
	int dptr = *ptr;
	int dptr = *ptr;
	SDEBUG("   dst: ");
	SDEBUG("   dst: ");
	dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
	dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
	SDEBUG("   src1: ");
	mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
	src1 = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
	SDEBUG("   mask: 0x%08x", mask);
	SDEBUG("   src2: ");
	SDEBUG("   src: ");
	src2 = atom_get_src(ctx, attr, ptr);
	src = atom_get_src(ctx, attr, ptr);
	dst &= src1;
	dst &= mask;
	dst |= src2;
	dst |= src;
	SDEBUG("   dst: ");
	SDEBUG("   dst: ");
	atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
	atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
}
}